Spring Boot makes it very easy to work on a project by reducing alot of boilerplate code and making the most of the application.properties key/values pairs.
Let us take a look at some of the most important lists of such properties when working with Spring Boot and RabbitMQ.
- RabbitMQ Connection Properties
Below are the four main properties that you will use to make a connect to the RabbitMQ server.
spring.rabbitmq.host=localhost # RabbitMQ Server Host IP/Domain spring.rabbitmq.port=5672 # RabbitMQ Server Port (default port 5672) spring.rabbitmq.username=guest # RabbitMQ username (default guest) spring.rabbitmq.password=guest # RabbitMQ password (default guest)
-
This property allows you to control if the queues, exchanges, or bindings should be declared automatically or not.
spring.rabbitmq.dynamic=true/false
-
Propery to set connection timeout.
spring.rabbitmq.connection-timeout=30000 #Connection timeout in milli-seconds
Using this property you can set the maximum number of allowed channels.
spring.rabbitmq.cache.channel.size=20 #max number fo channels allowed
Use this property to set the maximum number of connections in a cache.
spring.rabbitmq.cache.connection.size=5
Use the below two properties for publisher confirmation and returns.
spring.rabbitmq.publisher-confirms=true/false spring.rabbitmq.publisher-returns=true/false
Complete List:
spring.rabbitmq.address-shuffle-mode
spring.rabbitmq.addresses
spring.rabbitmq.cache.channel.checkout-timeout
spring.rabbitmq.cache.channel.size
spring.rabbitmq.cache.connection.mode
spring.rabbitmq.cache.connection.size
spring.rabbitmq.connection-timeout
spring.rabbitmq.dynamic
spring.rabbitmq.host
spring.rabbitmq.listener.direct.acknowledge-mode
spring.rabbitmq.listener.direct.auto-startup
spring.rabbitmq.listener.direct.consumers-per-queue
spring.rabbitmq.listener.direct.de-batching-enabled
spring.rabbitmq.listener.direct.default-requeue-rejected
spring.rabbitmq.listener.direct.idle-event-interval=
spring.rabbitmq.listener.direct.missing-queues-fatal=false
spring.rabbitmq.listener.direct.prefetch=
spring.rabbitmq.listener.direct.retry.enabled=false
spring.rabbitmq.listener.direct.retry.initial-interval=1000ms
spring.rabbitmq.listener.direct.retry.max-attempts=3
spring.rabbitmq.listener.direct.retry.max-interval=10000ms
spring.rabbitmq.listener.direct.retry.multiplier=1
spring.rabbitmq.listener.direct.retry.stateless=true
spring.rabbitmq.listener.simple.acknowledge-mode=
spring.rabbitmq.listener.simple.auto-startup=true
spring.rabbitmq.listener.simple.batch-size=
spring.rabbitmq.listener.simple.concurrency=
spring.rabbitmq.listener.simple.consumer-batch-enabled=false
spring.rabbitmq.listener.simple.de-batching-enabled=true
spring.rabbitmq.listener.simple.default-requeue-rejected=
spring.rabbitmq.listener.simple.idle-event-interval=
spring.rabbitmq.listener.simple.max-concurrency=
spring.rabbitmq.listener.simple.missing-queues-fatal=true
spring.rabbitmq.listener.simple.prefetch
spring.rabbitmq.listener.simple.retry.enabled=false
spring.rabbitmq.listener.simple.retry.initial-interval=1000ms
spring.rabbitmq.listener.simple.retry.max-attempts=3
spring.rabbitmq.listener.simple.retry.max-interval=10000ms
spring.rabbitmq.listener.simple.retry.multiplier=1
spring.rabbitmq.listener.simple.retry.stateless=true
spring.rabbitmq.listener.stream.auto-startup=true
spring.rabbitmq.listener.stream.native-listener=false
spring.rabbitmq.listener.type
spring.rabbitmq.password
spring.rabbitmq.port
spring.rabbitmq.publisher-confirm-type
spring.rabbitmq.publisher-returns=false
spring.rabbitmq.requested-channel-max
spring.rabbitmq.requested-heartbeat
spring.rabbitmq.ssl.algorithm
spring.rabbitmq.ssl.enabled
spring.rabbitmq.ssl.key-store
spring.rabbitmq.ssl.key-store-algorithm=SunX509
spring.rabbitmq.ssl.key-store-password=
spring.rabbitmq.ssl.key-store-type=PKCS12
spring.rabbitmq.ssl.trust-store-algorithm=SunX509
spring.rabbitmq.ssl.trust-store-password=
spring.rabbitmq.ssl.trust-store-type=JKS
spring.rabbitmq.ssl.trust-store=
spring.rabbitmq.ssl.validate-server-certificate
spring.rabbitmq.ssl.verify-hostname
spring.rabbitmq.stream.host
spring.rabbitmq.stream.name
spring.rabbitmq.stream.password
spring.rabbitmq.stream.port
spring.rabbitmq.stream.username
spring.rabbitmq.template.default-receive-queue
spring.rabbitmq.template.exchange
spring.rabbitmq.template.mandatory
spring.rabbitmq.template.receive-timeout
spring.rabbitmq.template.reply-timeout
spring.rabbitmq.template.retry.enabled
spring.rabbitmq.template.retry.initial-interval
spring.rabbitmq.template.retry.max-attempts
spring.rabbitmq.template.retry.max-interval
spring.rabbitmq.template.retry.multiplier=
spring.rabbitmq.template.routing-key
spring.rabbitmq.username=guest
spring.rabbitmq.virtual-host
Facing issues? Have Questions? Post them here! I am happy to answer!
- Deep Dive into Java 8 Predicate Interface
- Read and Parse XML file using Java DOM Parser [Java Tutorial]
- Java 8 Predicate Functional Interface isEqual() Method Example
- Convert Multidimensional Array toString In Java
- How to read int value using Scanner Class Java
- Spring Boot AI + LLM + Java Code Example
- Write to a File using Java Stream API
- Implementing Bubble Sort Algorithm using Java Program
- How to Fix XmlBeanDefinitionStoreException in Java SpringBoot ApplicationConfig.xml
- YAML Parser using Java Jackson Library Example
- [Fix] java: integer number too large compilation error
- Convert JSON String to Java GSON Object Example
- Read a file using Java 8 Stream
- Java Spring Boot 3 Web Hello World with Gradle in IntelliJ
- Ways Compare Dates in Java Programming with Examples
- Pretty Print JSON String in Java Console Output
- Java JDBC with Join Queries Example
- How to Check For Updates on Windows 11 (Step-by-Step)
- [Fix] java.net.MalformedURLException: unknown protocol
- How to display date and time in GMT Timezone in Java
- Error: LinkageError occurred while loading main class UnsupportedClassVersionError [Eclipse Java]
- How to convert a String to Java 8 Stream of Char?
- RabbitMQ Queue Listener Java Spring Boot Code Example
- 5+ Fibonacci number Series Java Program Examples [ 0 1 1 2 3 ..]
- Handling NullPointerException with Java Predicate
- Show Notepad++ tabs in multiple lines instead of scroll on tab bar - NotepadPlusPlus
- Shortcut to Open Snipping Tool on Windows and Take Screenshot - Windows
- How to Get the Relative Path of a file in Python Program - Python
- Downloading Google Chrome using cURL Command - cURL
- 20 Stylish Sign Up Buttons (Including 2024 Trends) - CSS
- [Android Studio] How to locate code for activity_main.xml - Android-Studio
- Fix SharePoint PowerShell error - The term Get-SPweb is not recognized as the name of a cmdlet function script file or operable program - SharePoint
- How to clear Cache, Cookies and History on iPhone Safari - iOS