0
votes

I am in process of building an application with IBM MQ. The suggested architecture to build it is using spring cloud stream. I have read in many articles that you can port your spring cloud messaging system to some other. That means, i can change my IBM MQ to kafka later also but provided binder implementation on classpath. What does that mean?

I have built a Spring Amqp application using rabbitmq and the features i used in my application are as belo,

  1. Request reply
  2. Dlq
  3. Producer and listener configuration both with scale up and down which means i can create a queue, its exchange and binding routing key using code.

I want to know is above feature available if i use spring cloud stream and do i need to change my implementation code to port ibm mq to kafka?

1
Is your question really just asking what the Classpath means? For example, let's say you have no Kafka code, it's for IBM or Rabbit, then you start to try to use Spring Kafka classes in the code, then you'll get compilation errors because theyre not found... So you need to add Kafka libraries to your classpath, and port parts of the code to use them - OneCricketeer
Another question is do i need to change my implementation code to shift from ibm mq to kafka? - Aditya Ekbote
I don't have experience with Spring Kafka, but at the very least, I think there's different annotations for "hooking up" Kafka settings, so yes - OneCricketeer
Alternatively, you can keep your IBM MQ code, and use Kafka Connect to move messages directly into Kafka docs.confluent.io/current/connect/kafka-connect-ibmmq/… - OneCricketeer

1 Answers

0
votes

The main goal of the spring-cloud-stream framework is to provide transparent binding capabilities to to a variety of external system and message brokers, to ensure that the actual user code stays agnostic to the type of broker used.

So yes, you can swap the binder from A to B without introducing any changes to your code. You may need to change some configuration parameters (e.g., broker URL, port etc). For more details please visit the project website which provides a very good summary of the capabilities of the framework as well as links to detailed documentation.