RabbitMQ real world scenario -



RabbitMQ real world scenario -

what require usage of rabbitmq is: producer produces messages , receiver receives all messages, published after time has first connected queue.

since consumer wants consume messages published. since, if more 1 consumer connected same queue, consumers not receive messages.(also, see here). hence, consumer must create 'exclusive' queue , connected desired exchange. also, wants receive messages published when downwards ( in future). hence queue 'durable'. now, scenario looks :

a consumer c1 creates queue q1 exclusive , durable. downwards time , in meantime user c2 tries connect queue q1. c2 successfull since, q1 has no subscriber connected it. so, c2 gets connected exclusive , durable queue. now, if c1 tries connect queue q1 cannot so, since consumer c2 subscribed queue q1.

how 1 can prevent such scenario ?

i hope, clear time.

ahhh!! simple answer... wasnot knowing thing consumer. create consumer exclusive. consumer can connect queue. if channel creating consumer closed, purpose fail. hence, channel must never closed, if using exclusive queues or consumers. can find more here.

rabbitmq

Comments

Popular posts from this blog

java - How to pass parameters between Request-Scoped Controllers? -

actionscript 3 - Flex: moving a point with rotation doesnt change the point XY? -

string - what is the difference between "some" == "some\0" and strcmp("some","some\0") in c++? -