SpringBoot RabbitMQ Topic Exchange » grokonez

SpringBoot RabbitMQ Topic Exchange » grokonez

In the past post, we had introduced about RabbitMQ Publish/Subcribe pattern with fanout exchange. Today, JavaSampleApproach will show you how to work with SpringBoot RabbitMQ Topic Exchange. Related posts: – RabbitMQ – How to create Spring RabbitMQ Producer/Consumer applications with SpringBoot – RabbitMQ – How to send/receive Java object messages with Spring RabbitMq | SpringBoot … Continue reading "SpringBoot RabbitMQ Topic Exchange"

https://grokonez.com/spring-framework/spring-amqp/springboot-rabbitmq-topic-exchange

SpringBoot RabbitMQ Topic Exchange

In the past post, we had introduced about RabbitMQ Publish/Subcribe pattern with fanout exchange. Today, JavaSampleApproach will show you how to work with SpringBoot RabbitMQ Topic Exchange.

Related posts:

I. Technologies

– Java 8 – Maven 3.6.1 – Spring Tool Suite – Version 3.8.1.RELEASE – Spring Boot: 1.5.7.RELEASE – RabbitMQ

II. RabbitMq Topic Exchange

routing_key of messages sent to a topic exchange must be a list of words, delimited by dots, example:
  • #.error
  • .prod.
  • sys.#

Note: * (star) must be an exactly one word. # (hash) can be zero or more words.

springboot rabbitmq topic - architecture

With the above topic exchange design,

  • when we send a message with routing key: sys.dev.info, it will just be delivered to Q1.
  • when we send a message with routing key: app.prod.error, it will just be delivered to Q2.
  • when we send a message with routing key: sys.test.error, it will be delivered to both queues {Q1, Q2}.
Topic exchange is strong tool and it can act as other exchanges as below:
  • When a queue is bound with "#" (hash) binding key - it is as an fanout exchange.
  • When don't use * & # in bindings, it will behave as a direct exchange.

III. Practices

In the tutorial, we create 2 SpringBoot project as below: springboot rabbitmq topic -project structure

https://grokonez.com/spring-framework/spring-amqp/springboot-rabbitmq-topic-exchange

SpringBoot RabbitMQ Topic Exchange

spring springboot rabbitmq topic exchange

What is Geek Coin

What is GeekCash, Geek Token

Best Visual Studio Code Themes of 2021

Bootstrap 5 Tutorial - Bootstrap 5 Crash Course for Beginners

Nest.JS Tutorial for Beginners

Hello Vue 3: A First Look at Vue 3 and the Composition API

SpringBoot RabbitMq Headers Exchange » grokonez

In the past post, we had introduced about RabbitMQ Topic Exchange. Today, JavaSampleApproach will show you how to work with SpringBoot RabbitMQ Headers Exchange. Related posts: – SpringBoot RabbitMQ Topic Exchange – RabbitMQ – How to create Spring RabbitMQ Producer/Consumer applications with SpringBoot – RabbitMq – How to create Spring RabbitMq Publish/Subcribe pattern with SpringBoot … Continue reading "SpringBoot RabbitMq Headers Exchange"

RabbitMQ – How to send/receive Java object messages with Spring RabbitMq | SpringBoot

In the previous posts, Spring RabbitMQ applications had produced/consumed String messages. Today, JavaSampleApproach will guide how to send/receive Java object messages with RabbitMQ server. Related posts: – RabbitMq – How to create Spring RabbitMq Publish/Subcribe pattern with SpringBoot – RabbitMQ – How to create Spring RabbitMQ Producer/Consumer applications with SpringBoot – SpringBoot RabbitMQ Topic Exchange … Continue reading "RabbitMQ – How to send/receive Java object messages with Spring RabbitMq | SpringBoot"

RabbitMQ - How to create Spring RabbitMQ Producer/Consumer applications with SpringBoot

RabbitMQ is one of the most popular open source message broker which meets high-scale, high-availability requirements. So in the tutorial, JavaSampleApproach will guide how to create Spring RabbitMQ Producer/Consumer applications by SpringBoot. Related articles: – How to use Spring JMS with ActiveMQ – JMS Consumer and JMS Producer | Spring Boot – SpringBoot RabbitMQ Topic … Continue reading "RabbitMQ – How to create Spring RabbitMQ Producer/Consumer applications with SpringBoot"

RabbitMQ Topic Exchange, Headers Exchange and Fanout Exchange (Part 3, RabbitMQ in .NET Core)

In this video, I am going to cover the following exchange types: 1. Topic Exchange: Topic exchange also uses a routing key, but it does not do an exact match on the routing key, instead it does a pattern match based on a pattern. 2. Headers Exchange: Headers exchange routes messages based on header values and are very similar to Topic exchange. 3. Fanout Exchange: As the name suggests, Fanout exchange routes messages to all the queues bound to it.

Spring vs Spring BooDifference Between Spring and Spring Boot

In this tutorial, we'll learn how does using Spring Boot make application development easier? Read ahead to find out.