Announcement Announcement Module
Collapse
No announcement yet.
REST over Rabbit Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • REST over Rabbit

    We are looking for a simple reference implementation of building REST services over Rabbit as well as through an HTTP gateway. The reason we would like to use Rest over Rabbit support is mainly to take advantage of persistence of the rabbit message queues on the client side. This will avoid any retry related issues with using REST over HTTP. The client code will first try using the REST through HTTP but if the server is down it should be able to queue the request over the message queue. I imagine that the REST request will be encoded within an instance of HttpEntity that can be sent as a payload over a SI message. The server side can retrieve the request, modify the URI to use localhost and use RESTTemplate to get the response. The response can then be sent back via Rabbit. The client side SI context will require some Message convertors on the reply channel before processing the response.
    Does this approach sound feasible at all?
    Thanks
    -clouddev

  • #2
    I'm not sure I see the reason to send a message over rabbitmq as if it's an HttpEntity. Why not just send JSON that is the same as what you would have sent within the HTTP request body? (and add headers to the rabbitmq message that would have been passed in the HTTP request, if necessary).

    Are you planning to have the message listener on the server side running within the same VM process that hosts the HTTP endpoint?

    Comment


    • #3
      Yes, the message listener will be actually running within the same webapp that hosts the HTTP endpoint as well. I would like to leverage common service modules between the Rest over HTTP and Rest over AMQP.

      Comment

      Working...
      X