testcontainers-java
                                
                                 testcontainers-java copied to clipboard
                                
                                    testcontainers-java copied to clipboard
                            
                            
                            
                        Add RocketMQ module
Add RocketMQ module in testcontainers.
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
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.
@bsideup Is there any progress about support rocketmq module?
@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
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.
Good catch, I'd like this feature shape :-)
I create a project(https://github.com/echooymxq/testcontainers-rocketmq) for Apache RocketMQ, i can contribute to this module if necessary.
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:
- RocketMQ has two components - nameserver and broker. we had to start the nameserver and the broker in one container.
- 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.
- 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.
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.
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.