Hot questions for Using RabbitMQ in architecture

Top Java Programmings / RabbitMQ / architecture

Question:

I am looking for best way to connect desktop based trading client with Trading server. Latency is most important factor to consider.

We have two option

1 Rest calls: I can call rest service from trading client but i don't think it's good way to do because each call would establish TCP session 2 AMQP(eg:RabbitMQ): We can publish message on RabiitMQ server and server can consume messages from there.

Please suggest which approach is best or is there any other possible approach is well.

Client is in .net and server is java service


Answer:

A Rest call is probably faster than a message queue call in most cases since the message queue will likely involve disk access.

For minimum latency, establish a direct TCP connection and implement your own protocol.

Question:

I'm new to rabbit MQ i want to use it in my app and i need some clarifications : - First My app is an api used as (maven dependency in multiple java projects) - the api role is to notify users when some events are detected in those projects - notifications will be in 2 ways by email and sms - every time an event is detected the api is writing it in rabbit mq Queues and senders (standalone projects for notifying, one for emails and another for sms) - first as a beginner i thought of it as 2 QUEUES related to a channel, one queue for SMS sender as consumer and another for EMAIL sender as a consumer, but how can i manage multithreading, when there are a lot of messages in QUEUES. i know my understanding of rabbit MQ is very weak but i have not a lot of time and i need help where to go and how to learn it fast ?


Answer:

One idea would be to have only one exchange for notifications and bind it to 2 queues, each for SMS and e-mail notifications. Good starting point. You can read up on routing (how bindings work etc.).