Solace Spring Cloud Stream Function (Processor pattern) with StreamBridge

Options
seph
seph Member Posts: 2
edited February 23 in General Discussions #1
Hi, I currently have a usecase wherein I have implemented a Processor pattern using the typical Bean Function<?,?> for my SCS application. I understand that a Processor pattern is a straightforward Input-Output Solace stream. But now I have an additional requirement that, within the processor, an arbitrary event message needs to emit another Solace Topic. An example of this arbitrary event is an application exception that must be emitted and sent to another service via Solace Topic.

I researched and found StreamBridge to be the current way to implement such arbitrary message sending. But when I tried doing so (add new producer config i.e. "solace.bindings.<binding-name>.producer.<queueNameExpression, etc.>", when streamBridge.send() is hit in SCS Processor flow, the message still gets sent to the consumer queue.

Previous style of implementations I saw for such usecase involve @StreamListener which as I've read is now a deprecated SCS feature so I wouldn't try that out anymore.

With this, I'm not sure whether it is really possible to combine both SCS Processor and Streambridge together. If anyone has ideas, I'll appreciate any thoughts towards my above usecase. Thanks!

Comments