I have a unique situation. We use Solace Cloud Hub as a broker to route events from external publishers to subscribers. Publishers and subscribers don’t know each other but publishers generate events that are important to subscribers. I don’t not have control over what the publishers put on the broker. Therefore I want the ability for subscribers to generate their own events for testing purposes so Im looking to build a test harness.
The issue is if subscribers have the ability to put messages on the broker is it possible that other subscribers queues will fill with their data. I want to make this as seemless for the subscriber as possible so if there is something I can do in the broker to stop test messages from being routed to other subscribers im interested in your views. Here are some of my thinking:
-
I want the ability for a subscriber to receive events with the same metadata and payload as if they were in production. This means that the subscriber doesnt need to make changes when they promote the code.
-
the test harness will run as an application so has the ability to add metadata to influence routing.
What I would like is a way to put a subscriber or queue in test node. When in test mode they will only receive messages that have been generated from the test harness. Once they have completed their testing and development we would disable test mode and they would receive messages from actual publishers.
Please note this is done on a test environment, not production. The test harness will not run there.
Appreciate your views
cheers
James
Hi there, I’m Solly AI, I generate responses to your questions using the power of the Solace Agent Mesh:
Please remember that AI technology can make mistakes so ensure that you read our Disclaimer.
AI Generated responses are a work in progress, your help in evaluating my response would be awesome! If my response makes sense, please mark it as a solution or give a
. If my response doesn’t make sense for your topic, please react to it with a
.
Looking at the documentation, I can suggest a solution using Message VPNs and Message Replay functionality:
-
Message VPNs allow segregation of topic space and clients. You can create a separate event broker service for testing to avoid impacting production subscribers.
-
Message Replay allows event brokers to resend messages to clients that request them hours or days after they were first received. When enabled:
- Messages are stored in a replay log
- You can initiate replay for queues or topic endpoints
- Messages from replay join the stream of live messages seamlessly
To implement test message delivery without affecting production:
- Create a separate event broker service for testing
- Enable Message Replay on the test service
- Configure topic filter subscriptions to capture the production messages you want to replay
- Use Message Replay to deliver those messages to test subscribers
This approach allows you to:
- Maintain message format consistency since you’re replaying actual production messages
- Avoid impacting production subscribers since replay happens in a separate service
- Control which messages are available for replay through topic filtering
Relevant documentation:
No this does not answer my question as subscribers will want to generate their own data for testing purposes that will work with their back end systems.
Hey @jdttaylor - thinking out loud here, do you have control on what topics you can publish to? if you use fine grain topic hierarchies then you can have your subscribers follow a processor pattern: subscribe to topics that publishers are publishing on (or binding to queues that contains the data from the publishers) and simply have the subscribe publish on “test” topics and have dedicated queues for those topics to avoid “other subscribers queues will fill with their data”. Meaning that if you publish on topics that are different from what the publishers in production are publishing on, then there is no possible what the other subscriber queues will fill in with the test data that you are publishing.
It’s difficult to propose a solution without more details on what you are trying to do and why, but hopefully this initiates a brainstorm.
Hi Tamimi, Thanks for your response.
The issue is this is a nation wide instance. Subscribers may want to get all events for New York. If I want to do some testing and I have and I put New York in the taxonomy everyone subscribing to * / * / NY / * will get my tests unless I find a way to toggle “test mode”.
I believe I have figured out a solution by leveraging the priority feature. My Test harness can set the priority for all events at 99. We enable reject low priority messages by default and set the threshold to 5 to get events where the publisher did not define the priority. When I want to run tests I put myself in test mode by disabling reject low priority it so we get all messages.