
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!
More Posts related to Java,
- Convert Java Map Collection Object to JSON String using Jackson
- Java Stream flatmap() Examples
- [Fix] Instant java.time.temporal.UnsupportedTemporalTypeException: Unsupported unit: Years
- How to run Java Unit Test cases with Apache Maven?
- How to check if Java main thread is alive
- [Fix] java: incompatible types: incompatible parameter types in lambda expression error
- Parsing CSV file using Java code example (Comma Separated File)
- Unhandled exception type InterruptedException : Java Threads
- Native getClass() method from java.lang.Object Class Explained with examples.
- Java Jackson ObjectMapper Class with Examples
- Java 8 Streams map() with examples
- Java 8 - Convert List to Map Examples
- IntelliJ: Error: Could not find or load main class, java.lang.ClassNotFoundException
- Java Stream with Multiple Filters Example
- How to Clear StringJoiner in Java 8
- Spring 5 IoC Example with application Context XML (ClassPathXmlApplicationContext) and Gradle.
- How to get end of line (EOL) or new line character \r \n in Java
- Spring Boot CRUD Examples using JDBCTemplate
- Delete a File in Java with Examples
- Implementing Insertion Sort Algorithm in Java Program
- Java JDBC Batch Update Example with PreparedStatement
- Java JDBC Select Multiple Records from table as List using PreparedStatement
- [Hibernate] The method buildSessionFactory() from the type Configuration is deprecated
- How to fix Java HTTP java.net.UnknownHostException
- Java 8 Display time in 12 hour AM PM format
More Posts:
- Java C# foreach loop equivalent in Python Programming - Python
- Remove AirDrop Icon from macOS Menu Bar - MacOS
- How to check if a variable is set in Bash Script or Not - Bash
- Vertical align two div's in Bootstrap [HTML CSS] - Bootstrap
- Amp Hello World Example - AMP
- What is exit(0), exit(1) ... exit(8) codes in Python Programming - Python
- Java 8: Convert Stream to Array - Java
- [Microsoft Teams 4c7] Modern authentication failed here, but you'll still be able to sign in. Your status code is 4c7 error - Microsoft