Win a copy of Hands On Software Engineering with Python this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

JMS messages can send synchronus messages?  RSS feed

 
Ranch Hand
Posts: 1303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I need to know whether JMS can send only asynchronous messages or it can send synchronous?
 
Ranch Hand
Posts: 542
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
do not think it can send synchronous message
 
sam liya
Ranch Hand
Posts: 1303
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how it sends the synchronous messages?
 
Saloon Keeper
Posts: 2257
289
Android Angular Framework Eclipse IDE Java Linux MySQL Database Redhat TypeScript
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

sam liya wrote:I need to know whether JMS can send only asynchronous messages or it can send synchronous?


The JMS API doesn't directly support request/response messaging, but you could build this in your application on top of what JMS provides, by having the two endpoints act as both producers and consumers.  Endpoint-1 (client) would send a request message to endpoint-2 (server), and then endpoint-1 would block waiting for a response message from endpoint-2.  After processing the request, endpoint-2 would then send a response message to endpoint-1.

In the request message sent by endpoint-1, an identifier value could be set carried in the JMSCorrelationID header.  Endpoint-2 would extract the identifier from the received message and set the JMSCorrelationID in its response message to the same value.  Endpoint-1 would use the identifier value to build a message selector so only messages which match the selector expression would be delivered to it.  You may want to use to use a pair of message queues - one for request messages and another for response messages.
 
I found a beautiful pie. And a tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!