cancel
Showing results for 
Search instead for 
Did you mean: 

Dynamic Queue names at JMS receiver

Former Member
0 Kudos

HI All,

I have a scenario where sender is an RFC and receiver is via JMS and also get a reply back . JMS is asynchonous but as suggested in other threads it is possible to capture the response by setting some Adapter specific parameters.

But my problem is the queue name for the response is not constant and it varies from request to request for the response. I have no clue how to achieve this , I tried searching some threads but couldn't come to a conclusion.

Has anyone come across such a situation ? Please suggest.

Also In one of threads it was suggested to use Java Proxy? Please suggest a way forward in this approach too

Regards,

Mohan.

Accepted Solutions (1)

Accepted Solutions (1)

former_member200962
Active Contributor
0 Kudos
JMS is asynchonous but as suggested in other threads it is possible to capture the response by setting
some Adapter specific parameters.

Synchronous behavior can be intoduced in JMS by using the Sync-Async Bridge concept.....ASMA may not work in JMS (never tried this)

Regards,

Abhishek.

Answers (5)

Answers (5)

Former Member
0 Kudos

Hi Sarvesh,

Yeah , Can you please explain how to configure to pick Queue names Dynamically? And if it is posible please explain why it is not possible to send it to RFC back . It would help me a lot to understand

Raj,

If i get the Queue name in the response Payload is it possible to pick it from there and process it ?I have already gone through the information on J2EE FAQ before posting this thread and I am a bit Confused at Point 2.8 in FAQ on configuring the Header ? When would we use rfh2 Header Information(USR) and how to do it and how would it be useful?

Many Thanks once again for your patient replies

Regards,

Mohan.

Former Member
0 Kudos

Hi Sarvesh,

Thank you. My flow is RFC --> PI --> JMS. And I have to get a reply back from JMS and give it to RFC . So for the response the Queue name is not constant it varies from payload to payload.

Is it possible using "JMSReplyTo" feature?

1. I have set the channel in JMS complaint mode

2. I have added this parameter "JMS.Message.DynamicDestination " to "true" .

I did not get how to add the MQRFH2 header to the message and also how to pick the Queue name dynmaically? Please correct if i am wrong and suggest a way through.

Thanks,

Regards,

Mohan.

Former Member
0 Kudos

Sorry in this case JMSReplyTo feature will not help you because your response will be coming by Sender JMS. This feature works for Receiver JMS adapter to set the queue names dynamically by using the ASMA setting in both sender & receiver JMS adapter.

Regards,

Sarvesh

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Krishna,

You want to add extra rfh2 Header Information(USR) in JMS Message??

JMS Receiver Adapter will give response back,but selecting queue name dynamicaly its not possible as per my knowledge.

if you want to add extra header to JMS message let me know i wll help you on the same,i done it.

Regards,

Raj

Former Member
0 Kudos

> JMS Receiver Adapter will give response back,but selecting queue name dynamicaly its not possible as per my knowledge.

Hello Raj,

Queue names can be given dynamically to receiver JMS adapter (I have done it) BUT in this case it is not possible.

Secondly may be I am wrong but how can Receiver JMS adapter will bring the response back to RFC?? Are there any module which will be added to receiver adapter to bring the response. Please correct & explain me. I appriciate your response.

Regards,

Sarvesh

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Sarvesh,

please refer the link what you provided in section 2.8 mentioned JMS Receiver communication channel will give response back,but i never tried.

one more thing could you please explain me how to give queue name dynamically.

Regards,

Raj

Former Member
0 Kudos

> please refer the link what you provided in section 2.8 mentioned JMS Receiver communication channel will give response back,but i never tried.

Yest because this document is applicabe for a scenario where request msg will come form sender JMS to XI and then Response will be sent back again to JMS by using receiver JMS adapter. So senario is JMS request --- R3 (via XI) --- R3 response to JMS.

But here case is different. e.g. RFC --> PI --> JMS and reply will get back from JMS to RFC. So definetly in this case response will come from sender JMS and not from receiver JMS.

Read sec 2.8 throughly, you will come to know how to set the queue names dynamically for RECEIVER JMS Adapter.

Regards,

Sarvesh

Former Member
0 Kudos

Hi,

It is very much possible in JMS adapter by using ASMA settings. Go through this link and see question no 2.9 and then for ans see question 2.8

http://wiki.sdn.sap.com/wiki/display/XI/FAQ+J2EEJMS+Adapter

If you feel any problems in configuration do let me know. At the same time I would like to know the exact flow of your scenario. If I am not wrong then your request is coming from JMS sender adapter to RFC and then reponse from RFC to receiver JMS.

Something like Sender JMS ---> RFC -


> Receiver JMS.

Regards,

Sarvesh

Former Member
0 Kudos

Hi Raj,

Do you mean to write java server proxy instead of JMS receiver channel .Can you please guide me little forward on Java Proxy giving steps on what I have to do ? Can you please give me the links for Java API to send messages to MQ, I tried searching but couldn't get the exaxct one?

Thanks for your patience,

Regards,

Mohan.

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Krishna,

please refer below link,it contains different type of examples,you need to add logic select queue name runtime,i am not sure how to write,buit surely we can achieve this.

the server proxy need send message to MQ , use IBM MQ Liabrary files,and source code also available in below link,just converth the same in to JAVA Proxy.

http://www.capitalware.biz/mq_code_java.html

Regards,

Raj

rajasekhar_reddy14
Active Contributor
0 Kudos

Hi Krishna,

Its not possible to give Quename dynamically,as of now there is no predefined option available.

Just think about writing JAVA Proxy or new Adapter.

JAVA Proxy is the easiset wat to achieve your requirement,because there are predefined methods availabe from IBM to send messages to MQ Series.

writing new adapter is time taking process and you need to expert.

Regards,

Raj