{"id":23289802,"url":"https://github.com/devdevx/springboot-rabbitmq","last_synced_at":"2025-08-17T16:40:57.490Z","repository":{"id":177661296,"uuid":"145165594","full_name":"devdevx/springboot-rabbitmq","owner":"devdevx","description":null,"archived":false,"fork":false,"pushed_at":"2018-11-04T21:59:37.000Z","size":70,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-06T17:17:42.882Z","etag":null,"topics":["boilerplate","heroku","java","producerconsumer","rabbitmq","rabbitmq-exchange","springboot2"],"latest_commit_sha":null,"homepage":null,"language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/devdevx.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-17T20:51:34.000Z","updated_at":"2019-05-14T01:47:36.000Z","dependencies_parsed_at":"2023-07-07T04:15:15.543Z","dependency_job_id":null,"html_url":"https://github.com/devdevx/springboot-rabbitmq","commit_stats":null,"previous_names":["devdevx/springboot-rabbitmq"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/devdevx/springboot-rabbitmq","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devdevx%2Fspringboot-rabbitmq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devdevx%2Fspringboot-rabbitmq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devdevx%2Fspringboot-rabbitmq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devdevx%2Fspringboot-rabbitmq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/devdevx","download_url":"https://codeload.github.com/devdevx/springboot-rabbitmq/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/devdevx%2Fspringboot-rabbitmq/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270877254,"owners_count":24661121,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["boilerplate","heroku","java","producerconsumer","rabbitmq","rabbitmq-exchange","springboot2"],"created_at":"2024-12-20T04:18:20.588Z","updated_at":"2025-08-17T16:40:57.444Z","avatar_url":"https://github.com/devdevx.png","language":"Java","readme":"# Introduction\n\nThis project contains multiple examples using the different RabbitMQ exchanges with Spring Boot 2.\n\nAdditionally, the project contains all the configuration files that are required to run in Heroku.\n\n# Examples\n\n## Default exchange (`basic`)\n\nThe default exchange is a direct exchange with no name.\nEvery queue is automatically bound to the default exchange with a routing key which is the queue name.\n\n## Fanout exchange (`broadcast`)\n\nThe fanout exchange sends the message to all queues that are bound to it.\n\n## Direct exchange (`direct`)\n\nThe direct exchange sends the message to the queues that are bind to the exchange with the same routing key that is used to send the message.\n\n## Headers exchange (`headers`)\n\nThe headers exchange sends the message to the queues that are bind to the exchange with any/all of the headers of the message.\n\nTe use of this type of exchange is not recommended if you can use the topic exchange, its performance is better.\n\n## Topic exchange (`topic`)\n\nThe topic exchange sends the message to the queues that are bind to the exchange with a routing pattern that match the routing key.\n\nIn this exchange the routing key is a list of words delimited by periods (.).\n\nThe routing patters consists of exact words, asterisks (*) to match a word and hashtags (#) to match zero or more words.\n\n# Exception handling\n\nThe default configuration for the unhandled exceptions is requeuing the message. We can change this in the properties (`spring.rabbitmq.listener.simple.default-requeue-rejected`). \n\n# Running it\n\n## Running locally\n\n### With docker compose\n\n1. Select the example to run changing the value of the property `app.rabbitmq.example` in the file `application-dev.properties`. (Supported values are `basic | broadcast | direct | headers | topic`)\n1. Run `docker-compose up` in the root folder.\n1. Run `mvnw spring-boot:run -Dspring-boot.run.profiles=producer,dev` in the root folder to start a instance of the producer.\n1. Run `mvnw spring-boot:run -Dspring-boot.run.profiles=consumer,dev` in the root folder to start a instance of the consumer.\n\nYou can enter in the the rabbit web console going to `http://localhost:15672/` with the credentials `guest:guest`.\n\n### Without docker compose\n\n1. Select the example to run changing the value of the property `app.rabbitmq.example` in the file `application-dev.properties`. (Supported values are `basic | broadcast | direct | headers | topic`)\n1. Configure the properties of the RabbitMQ in the file `application-dev.properties`.\n1. Run `mvnw spring-boot:run -Dspring-boot.run.profiles=producer,dev` in the root folder to start a instance of the producer.\n1. Run `mvnw spring-boot:run -Dspring-boot.run.profiles=consumer,dev` in the root folder to start a instance of the consumer.\n\n## Running on Heroku\n\nTo run the example in Heroku, you need the CloudAMQP add-on.\n\nThe configuration is defined in the `Procfile`.\n\nThe env properties are:\n\n|Property|Definition|Default value|\n|--------|----------|-------------|\n| CLOUDAMQP_URL | RabbitMQ connection url, added by the add-on | - |\n| EXAMPLE_TYPE | The example to run | basic |\n| DELAY_MS | The delay between sends in milliseconds | 10000 |","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevdevx%2Fspringboot-rabbitmq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdevdevx%2Fspringboot-rabbitmq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdevdevx%2Fspringboot-rabbitmq/lists"}