I have a question regarding message handling in Solace Advanced Event Mesh (AEM).
Scenario:
SAP S/4HANA publishes messages to a specific topic.
At that moment, there is no queue subscribed to that topic (i.e., no queue has a matching topic subscription).
I would like to understand the following:
What happens to the published messages in this scenario?
Are the messages immediately discarded, or are they stored anywhere within Solace?
If the messages are discarded, is there any way to view or trace them afterward (for example, through broker logs, event logs, or any other monitoring mechanism)?
Can Datadog capture or report such events (messages published with no matching queue subscriptions)?
What is the recommended best practice to prevent message loss in this scenario?
Is there any configuration or feature in Solace AEM that can detect or alert when messages are published to topics that have no subscribed queues?
Any guidance or best practices would be greatly appreciated.
This is a great question and covers a lot of the important aspects of Solace/SAP AEM message handling. Let me try and answer your questions in detail below;
Handling of messages with no matching queue subscriptions
If SAP publishes to a topic with no matching queue subscriptions, the message is discarded immediately. It is never stored on the broker : SAP AEM’s pub/sub model only spools a guaranteed message to a queue if that queue already had a matching topic subscription at the moment of publish
Tracing of such lost messages
SAP AEM does not provide message-level content tracing for discarded messages, but you can detect and quantify discards via:
show log no-subscription-match
This CLI command shows the most recent topics published. It is the most actionable diagnostic tool for this exact scenario.
Datadog monitoring of lost messages
Indirectly yes, but not out of the box as a specific “no-match” event. AEM exposes broker stats (including discard counters) via SEMP, and Solace Insights can forward these to Datadog (or Dynatrace/Splunk/Prometheus/Grafana) via the Insights Agent. A custom dashboard can be built on the discard counter trending up but not on individual unmatched messages.
Best practices to prevent message loss
There are multiple steps that you can take to prevent message loss, I am detailing some of them below :
Provision subscriptions before publishers go-live : Standard EDA discipline, queue and subscription should exist before the events start getting published. Use Event Portal to govern this so publisher/consumer rollout order is enforced.
Reject-to-Sender on no-subscription-match : Enable the client profile property : Reject-Messages-to-Sender-On-No-Subscription-Match-Discard. This will push back to SAP a NACK when where is no matching subscriber, so the failure is visible on the publisher side. This is the most direct fix for your problem statement.
Monitor discard stats : Have proper dashboarding and reporting which will help you catch systemic misconfigurations.
Hi Hari_Rangarajan, thank you for your suggestion. I followed the approach you recommended, and it resolved the issue successfully. Thanks again for your valuable assistance!
I want to also point out that enabling the client profile property : Reject-Messages-to-Sender-On-No-Subscription-Match-Discard will only push back to SAP a NACK if the original message being published was a guaranteed message.