Announcement Announcement Module
Collapse
No announcement yet.
Is it possible to Embed RabbitMQ for Test Cases (JUnit, etc.) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Is it possible to Embed RabbitMQ for Test Cases (JUnit, etc.)

    While mocking is good for unit testing individual components, is it possible to embed a Rabbit broker which is spun up solely for test purposes? For JMS in a JUnit we spun up an isolated ActiveMQ instance where we could test both the send and receive of a message to verify all config is correct. Is there any way to do something similar with Rabbit?

  • #2
    ActiveMQ is written in Java. RabbitMQ is written in erlang and needs an erlang runtime so, no, it's not possible to embed it in the same way. It would have to be installed on the test machine.

    You could exec a shell script to start/stop rabbitmq before/after the tests, but we usually just leave it running - it doesn't really eat up much resource when idle.

    Comment


    • #3
      Ok, thanks Gary. That's what I was afraid of but wanted to make sure before spending even more time trying to see if it was possible.

      Comment

      Working...
      X