Middle+
What message brokers have you worked with?
sobes.tech AI
Answer from AI
In my practice, I have worked with the following message brokers:
- Apache Kafka — used for organizing high-performance message transfer between microservices, ensuring resilience and scalability.
- RabbitMQ — applied for tasks with guaranteed delivery and complex message routing.
- ActiveMQ — familiar with it for integration solutions based on JMS.
Example of using Kafka in Java:
Properties props = new Properties();
props.put("bootstrap.servers", "localhost:9092");
props.put("key.serializer", "org.apache.kafka.common.serialization.StringSerializer");
props.put("value.serializer", "org.apache.kafka.common.serialization.StringSerializer");
KafkaProducer<String, String> producer = new KafkaProducer<>(props);
producer.send(new ProducerRecord<>("topic", "key", "message"));
producer.close();