Win a copy of Grokking Bitcoin this week in the Cloud/Virtualization 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
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

JMS messages can send synchronus messages?  RSS feed

 
Ranch Hand
Posts: 1313
1
  • 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: 1313
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how it sends the synchronous messages?
 
Saloon Keeper
Posts: 2504
321
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.
 
Happily living in the valley of the dried frogs with a few tiny ads.
ScroogeXHTML - the small and fast RTF to HTML converter library
https://coderanch.com/t/707504/ScroogeXHTML-RTF-HTML-XHTML-converter
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!