testcontainers-java icon indicating copy to clipboard operation
testcontainers-java copied to clipboard

Add RocketMQ module

Open xuesongxs opened this issue 5 years ago • 8 comments

Add RocketMQ module in testcontainers.

xuesongxs avatar Oct 16 '20 01:10 xuesongxs

Hi @xuesongxs,

Is there any trouble using RocketMQ with GenericContainer? If so, consider contributing a module as per https://www.testcontainers.org/contributing/#contributing-new-modules

bsideup avatar Oct 16 '20 08:10 bsideup

Hi @xuesongxs,

Is there any trouble using RocketMQ with GenericContainer? If so, consider contributing a module as per https://www.testcontainers.org/contributing/#contributing-new-modules

I want to use RocketMQ in testcontainers, but testcontainers doesn't have this feature.

xuesongxs avatar Oct 16 '20 08:10 xuesongxs

@bsideup Is there any progress about support rocketmq module?

ruanwenjun avatar Aug 25 '21 08:08 ruanwenjun

@ruanwenjun Testcontainers provides GenericContainer that can be used with any Docker image, it does not need to be supported by Testcontainers.

If somebody wants to contribute a module, just to make it more convenient, here is the docs page that describes the process: https://www.testcontainers.org/contributing/#contributing-new-modules

bsideup avatar Aug 25 '21 08:08 bsideup

In addition, if some can outline the already encountered issues (in case there are any) in using RocketMq with GenericContainer here, we can further assess and discuss the need for a dedicated module.

kiview avatar Aug 25 '21 09:08 kiview

Good catch, I'd like this feature shape :-)

vongosling avatar Dec 10 '21 00:12 vongosling

I create a project(https://github.com/echooymxq/testcontainers-rocketmq) for Apache RocketMQ, i can contribute to this module if necessary.

echooymxq avatar Nov 15 '22 08:11 echooymxq

I create a project(https://github.com/echooymxq/testcontainers-rocketmq) for Apache RocketMQ, i can contribute to this module if necessary.

@kiview I have encountered some issues when using RocketMq with GenericContainer, and had to use the following works to get it working:

  1. RocketMQ has two components - nameserver and broker. we had to start the nameserver and the broker in one container.
  2. The clients use the nameserver to find the broker and send messages to a specific broker based on the topic. So we expose the nameserver port and the broker port.
  3. The most problematic point is that the broker register the broker address to the nameserver, the broker address is the ip address of the container and a fixed port. So we get the host and the mapped port of the container and update the broker config, use it to re-register the broker address to the nameserver.

If Testcontainers have this module, people can use it to test the Apache RocketMQ easily.

echooymxq avatar Nov 16 '22 02:11 echooymxq

Hi @echooymxq

Thanks for creating the module and sorry for the late reply. Nowadays, Testcontainers offers a Module Catalog and your module can be listed there, you only need to submit a PR to this repository.

Looking forward to it.

eddumelendez avatar Jul 13 '23 01:07 eddumelendez

Hi @echooymxq

Would you be willing to contribute your module as described above to make it easier for many people to use RocketMQ container?

Looking forward to your reply.

pandaapo avatar Nov 23 '23 00:11 pandaapo