Just wonder, what are the main differences between rest and amqp request-reply? Is it amqp request-reply consider async ?
On PubSub+ Broker HTTP/REST is used in "Fire and Forget"/async mode, it's a one way communication protocol only. So you can't do Request/REPLY over HTTP/REST
REST Can be used in two ways with Solace :
Example : if you're coding in PHP for example, where's there's no Daemon running all the time, you could HTTP POST to solace an event, have some microservices processing the event and use RDP to get the processing result back as an HTTP POST sent to your PHP server using RDP.
AMQP Request Reply : a queue is dynamically provided so that your requester get the reply.
Check this tutorial :
AMQP link is bidirectionnal.
Is it amqp request-reply consider async ?
I would say no, since you're client is blocked until you'll get the response.
But the other side, the code that process the request and produce the reply, it can be async, scale up and down, use the benefit of the broker for guaranteed messaging (no message loss), Partitioned Queue to ensure messages are processed "in order" while being able to scale the number of microservice processing the requets
Hi @Thomas Manson , I have few questions
1) If requester is sending request using amqp protocol, will the requester/client be blocked until receive response ? Initially , I thought the requestor will not be blocked while waiting for response for the request.
2) How about Microgateway service in PubSub+ Broker (HTTP REST - support put/delete/get method )? Is it still a "Fire and Forget"/async mode? What do you mean cannot do Request/REPLY over HTTP/REST?
Correct @dreamoka, I read @Thomas Manson's response and was about to pop in and say don't forget about Microgateway mode. That does allow for request/response via REST. But note that you set it for the entire messaging service or VPN, so that might prevent you from using it.
If it is an option for you, then @Aaron has created some great content over the years re: microgateway that might help.
1/ The tutorial is showing JMS/AMQP example and the call is blocking for a configurable amount of time :
Message reply = context.createConsumer(replyToQueue).receive(REPLY_TIMEOUT_MS);
If you look at other protocol like SMF, you can use both blocking and non blocking request :
2/ you're right, I forgot about the microgateway. if the broker is configured in a microgateway mode, you can get request/reply behavior.
I've not used it myself, so I just know the theory about it 😅
On the AMQP client side it really depends on the capabilities of the library that you choose. Solace doesn't provide an AMQP library, we just support the amqp v1 protocol so you would choose what client lib you want. The apache qpid ones are probably the most popular from what I've seen.
Yeah. I agree. it really depends on the capabilities of the library that AMQP client is using.
As I using RHEA Promise for my nodejs project -https://github.com/amqp/rhea-promise, the requestor does not block while waiting for response for the request.