Best Of
Re: In the .NET API, why isn't the `CorrelationKey` set on the `RejectedMessageError`?
Hey gents. Good debugging! I've added a note to our internal bug tracking tool (REF #57039) to ping this thread when this is fixed. Don't hold your breath though, there is a backlog of much more interesting features to be implemented. At least there's a mostly workable workaround for this.
Thanks!
Re: How to configure the @JmsListener and receive Solace Topic messages ?
@marc I'm sorry, I think I have solved this issue by configuring the DefaultJmsListenerContainerFactory
Solace Try-Me CLI (stm): A sleek command-line tool for messaging Solace PubSub+ Broker
Thrilled to introduce a new command-line tool Solace Try-Me CLI, simply called stm that brings the robust messaging capabilities of the Solace PubSub+ broker right to your fingertips! stm designed specifically for interacting with Solace Broker! This standalone tool is perfect for anyone looking to dive into messaging concepts without the hassle of dependencies or having to write code. Whether you’re publishing, subscribing, or engaging in request-reply message exchanges, this tool offers a seamless experience to see messaging in action. We invite you to try it out and explore the capabilities of the tools firsthand.
Why a command-line tool? Its streamlined interface cuts through the clutter, providing direct and efficient interaction with systems, which is especially critical in development environments. stm ensures quick connectivity and fast execution whether you're working with broker deployed locally or on the cloud.
Experience the efficiency and simplicity of managing your messaging needs with the stm command-line tool, designed for ease and precision in a compact, powerful package.
A Pub-Sub in action:
A request-reply in action:
And the codebase is available on Git - documentation, examples and other forms of help can be found there.
You have the Source - Git Repo:
Where to Download:
NOTE: Download the latest version for your host OS
stm EXAMPLES:
Solace Try-Me CLI (stm) TOOL - README:
stm PARAMETERS Documentation
Reporting Bugs & Enhancements:
Please share your feedback and feel free to contribute as well.
TestContainers for Solace PubSub+
I am excited to share an update on Testcontainers for Solace PubSub+ module.
For those who have not worked with Testcontainers, let me help you with the introduction
Testcontainers is an open source framework for providing throwaway, lightweight instances of databases, message brokers, web browsers, or just about anything that can run in a Docker container. It simplifies the process of integrating unit tests with external dependencies by allowing you to declare these dependencies directly in the test code. The containers can be used for a single test and then discarded, ensuring a clean test environment with no configuration clashes or dependency issues.
The importance of Testcontainers for developers lies in its ability to create a more reliable and consistent testing environment. By using testcontainers, developers can easily emulate specific versions of software and other dependencies that the application interacts with.
Solace Testcontainers extends the utility of the general Testcontainers framework by providing a way to spin up Solace PubSub+ event broker instances as part of the test environment. For developers working with event-driven architectures, this is particularly crucial because it allows you to test the interactions of your applications with a fully functional message broker in a controlled environment. This integration ensures that developers can test your messaging infrastructure and event-driven workflows thoroughly, catching potential issues early in the development cycle and significantly reducing the risk of bugs in production environments. This capability is especially important for building robust, scalable, and fault-tolerant distributed systems.
A simple 2-line of code can get you a message broker up and running for testing:
var solaceContainer = new SolaceContainer(DockerImageName.parse("solace/solace-pubsub-standard:latest")); solace.start();
The Solace testcontainer module for Java can be found here Solace PubSub+. For the curious minds that want to look under the hood, the code for this module can be found here. It supports working with the standard protocols supported by Solace broker: AMQP, MQTT, REST, SMF and SMF+SSL.
In conclusion, Testcontainers helps developers gain the ability to automate tests in a consistent and isolated environment, thereby avoiding the "it works on my machine" syndrome and ensuring that their applications are thoroughly tested against a real Solace broker before deployment. This approach not only reduces bugs and deployment risks but also significantly enhances the reliability and scalability of applications in production environments. Hence, leveraging Testcontainers for testing Solace PubSub+ brokers is a prudent choice for developers aiming to build high-quality, event-driven systems.
Would love to hear your take - give it a try and share your feedback!
Re: How to solve this error: Received disposition with role=receiver
Awesome, good troubleshooting @Aaron !
Re: Content resolution example with Spring Cloud Stream
Thanks Marc!
The sink example is helpful … and for "the simplest of examples", would be great to see this be even simpler!
Instead of
channel.send(MessageBuilder.withPayload(new SensorReading("test", 50, BaseUnit.FAHRENHEIT)).build());
For example … with the help from above, this is what I am now doing with a StreamBridge
streamBridge.send("try-me", new PersonPOJO("Miles Archer"));
Re: Content resolution example with Spring Cloud Stream
I cloned your code, even installed a JDK21. Got it working by moving the Person event class out of the Application class and into it's own class.
Application.java
@SpringBootApplication public class HelloWorldSpringCloudStreamApplication { public static void main(String... args) { SpringApplication.run(HelloWorldSpringCloudStreamApplication.class, args); } @Bean public Consumer<PersonEvent> exampleEventConsumer() { return personEvent -> { System.out.println("Received event: " + personEvent.getName()); }; } }
PersonEvent.java
@JsonInclude(JsonInclude.Include.NON_NULL) public class PersonEvent { private String name; public String getName() { return name; } public void setName(String name) { this.name = name; } @Override public String toString() { return "PersonEvent, name="+name; } }
Also, you were escaping your quotes in your payload..? Here's a handy command-line tool my colleague wrote that is useful for things like this:
Just download the latest release, that's what I use:$ ./stm send -t try-me -m '{"name":"Aaron"}'
Hope that's enough to get you going now..! 👍🏼
Re: Solace Python API on Mac M1 ?
Just a friendly ping that the latest version of the Python API has been released (v. 1.7.0) with support for Mac M-series processors. It should be slowly rolling out in different places and is already available via PyPI (
)Thanks again for all your patience!
Re: Unable to start the Solace pubsub in podman
Hi @vase18,
It looks like you have mapped port 1943 (for HTTPS access to the PubSub+ Manager) through but, you have not configured a server certificate. Try mapping through port 8080 and accessing the Manager via HTTP or configure a server certificate. I think either of those will get you going.
Best Regards,
Paul