RabbitMQ Request/Response payload structure -


i'm designing system use rabbitmq request/response between applications.

i'm used working rest apis , coming background i've been thinking how structure messages when doing request/response.

i need structure handle several scenarios:

  • getting / querying data remote server
  • creating data on remote server
  • handling client side errors

i'm planning have payload json formatted. , thinking using kind of response codes similar http(maybe using same codes?) , set response code property/header on message.

for getting/querying idea have query property in payload object.

but got me thinking might thinking rest apis , there better, more-established way of doing this.

i've been reading book "rabbitmq in action" while setting see no mention of there. google-fu has failed me , not provided results.

anyone experience willing share how structure messages?

if using rabbitmq in request/response scenario among applications familiar or implemented handle rest calls, there no need deviate in rabbitmq message format.

from question, gather rabbitmq acts intermediate server in between application. mention 3 scenarios. if take retrieving data , writing data, here rabbitmq acts router between application requests retrieve or write data , application retrieves , writes data. if so, there standard message format serving application (the server data) may support. assume not have standard defined. in case, can think in terms of application expects in request payload. forget intermediate rabbitmq server during stage. thinking rabbitmq messages might deviate using best practices.

as client side errors, cannot directly set http status codes headers interfere rabbitmq errors in consumer. believe, in case have use customization passing custom header , converting http status code later on.


Comments

Popular posts from this blog

asynchronous - C# WinSCP .NET assembly: How to upload multiple files asynchronously -

aws api gateway - SerializationException in posting new Records via Dynamodb Proxy Service in API -

asp.net - Problems sending emails from forum -