on 11-19-2010 12:46 PM
Hi,
Does anyone know if the failover:// protocol is supported by PI in JMS adapter when using transport protocol: Access JMS provider Generically?
Scenario: PI 7.11 JMS channel sending and receiving JMS messages with Apache MQ 5.2 JMS provider.
Following parameter is maintained as additional Parameter in sender JMS channel:
JMS.QueueConnectionFactoryImpl.classname = org.apache.activemq.ActiveMQConnectionFactory
JMS.QueueConnectionFactoryImpl.constructor = java.lang.String tcp://host:port
JMS.QueueImpl.classname=org.apache.activemq.command.ActiveMQQueue
JMS.QueueImpl.constructor=java.lang.String TEST.Q
The connection works fine in production.!!!
Now, problem starts when Apache MQ host started using custering. there is now two host both hosting same queues for cases like failover.
http://activemq.apache.org/clustering.html
As per apache configuration syntax (http://activemq.apache.org/failover-transport-reference.html) we tried to use following
JMS.QueueConnectionFactoryImpl.constructor = java.lang.String failover://(tcp://host A:port,tcp://host B:port)?randomize=true
or
JMS.QueueConnectionFactoryImpl.constructor = java.lang.String failover:(tcp://host A:port,tcp://host B:port)?randomize=true
but both following error:
Error creating JMS connection. The JMS provider gave the error message as Could not create Transport. Reason: java.io.IOException: Invalid location: failover://(tcp://host A:port Invalid location: failover://((tcp://host A:port, and the error code as null.
Have anyone used clustering with Apache MQ with PI 7.11? Does PI support JMS provider clustering for queues and topics?
Your answer is much appreciated.
Br
Suman
Hi Suman,
Please try to URL encode the comma ',' separator of the failover hosts with %2C.
JMS.QueueConnectionFactoryImpl.constructor = java.lang.String failover://(tcp://host A:port%2Ctcp://host B:port)?randomize=true
or
JMS.QueueConnectionFactoryImpl.constructor = java.lang.String failover:(tcp://host A:port%2Ctcp://host B:port)?randomize=true
The reason for this is that the JMS adapter uses ',' sign for delimiting multiple parameters in connection factory constructor or method, so your URI is truncated.
Best Regards,
Dimitar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Dimitar,
I also get this from SAP support that this is not a feature in PI JMS adapter and they don't have codebase to support this kind of provider specific failover. Also Apache MQ is new to PI connectivity!! I guess we just got lucky in this case that this is at least connecting to Apache MQ using failover keyword. However I am still testing this connection with application systems (e-to-e). I already faced some strange things like if the queue is not instantiated in one of the failover host in FUSE (apache MQ); PI throws error saying, JMS user don't have authorization to create queues. Which is really strange as when we put a test message in the queue the error disappear!!!.
Anyway can you please share your experience with this type of connection or elaborate on cases where it doesn't work "for arbitrary parameter"?? would be helpfull for me or whoever face this type of challanges I guess.
Many thanks
Suman.
Hi Suman,
JMS Adapter uses what is specified in the JMS spec to communicate with the providers. As the spec does not say anything about failover it is upto the provider to define how it is done. In this respect PI JMS Adapter could use any JMS provider, which is compiant with JMS spec.
If you are experiencing any strange behaviour and you can repoduce please set the severity of the log location com.sap.aii.adapter.jms to debug and attach the complete exception. It could be some behavior of queues with the ActiveMQ.
I do not have any specific experience with this provider, so I will be glad to know how this works for you.
Regarding the parameter question, what I mean is that if the parameter did not represent an URL but some other setting with ',' in the values, it would not work as nobody would decode it.
Best Regards,
Dimitar
Does anyone have this running with AEX 7.4 and ActiveMQ 5.9.1? I cannot get this working in our System.
When I use this connection string everything is working fine:
java.lang.String failover:tcp://server3.domain.net:61616
However when I add two other servers separated by %2C it is not working, the communication channel stays in status starting and I cannot see an active connection in ActiveMQ:
java.lang.String failover:tcp://server1.domain.net:61616%2Ctcp://server2.domain.net:61616%2Ctcp://server3.domain.net:61616
Any idea where the error is? I can see nothing in the logfiles of the AEX...
Best regards,
Markus
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello!
I don't think this is implemented in the JMS adapter.Usually, in case of failover, the constructor receives a string like:
java.lang.String tcp://host A:port, tcp://host B:port
Isn't possible to set the configuration like that?
BR,
Lucas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
24 | |
12 | |
9 | |
7 | |
6 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.