{"id":21018778,"url":"https://github.com/hantbk/rabbitmq-go","last_synced_at":"2025-07-17T23:02:51.009Z","repository":{"id":262404566,"uuid":"886954742","full_name":"hantbk/rabbitmq-go","owner":"hantbk","description":"Advanced Message Queue Protocol using RabitMQ","archived":false,"fork":false,"pushed_at":"2024-11-13T11:03:57.000Z","size":8,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-20T12:33:53.819Z","etag":null,"topics":["direct","go","golang","rabbitmq","rabbitmq-consumer","rabbitmq-producer","topic"],"latest_commit_sha":null,"homepage":"","language":"Go","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/hantbk.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":"2024-11-11T23:03:21.000Z","updated_at":"2024-11-13T11:05:26.000Z","dependencies_parsed_at":"2024-11-19T10:52:08.267Z","dependency_job_id":null,"html_url":"https://github.com/hantbk/rabbitmq-go","commit_stats":null,"previous_names":["hantbk/amqp","hantbk/rabbitmq-go"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hantbk%2Frabbitmq-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hantbk%2Frabbitmq-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hantbk%2Frabbitmq-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hantbk%2Frabbitmq-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hantbk","download_url":"https://codeload.github.com/hantbk/rabbitmq-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243447639,"owners_count":20292453,"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","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":["direct","go","golang","rabbitmq","rabbitmq-consumer","rabbitmq-producer","topic"],"created_at":"2024-11-19T10:27:37.398Z","updated_at":"2025-03-13T17:21:16.581Z","avatar_url":"https://github.com/hantbk.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RabbitMQ Go Messaging Project\n\nA demonstration of message queuing with RabbitMQ using Go.\n- Direct exchange type for message routing\n- Topic exchange type for message filtering\n\n## Prerequisites\n\n- Docker and Docker Compose\n- Go 1.16+\n- RabbitMQ Go client: `github.com/rabbitmq/amqp091-go`\n\n## Project Setup\n\n1. Initialize the Go project:\n```bash\nmkdir rabbitmq-go\ncd rabbitmq-go\ngo mod init rabbitmq-go\ngo get github.com/rabbitmq/amqp091-go\n```\n\n2. Create `docker-compose.yml`:\n```yaml\nversion: '3.8'\n\nservices:\n  rabbitmq:\n    image: rabbitmq:4.0-management\n    container_name: rabbitmq\n    ports:\n      - \"5672:5672\"     # RabbitMQ messaging port\n      - \"15672:15672\"   # Management interface\n    environment:\n      RABBITMQ_DEFAULT_USER: guest    # Default username\n      RABBITMQ_DEFAULT_PASS: guest    # Default password\n    volumes:\n      - rabbitmq_data:/var/lib/rabbitmq\n\nvolumes:\n  rabbitmq_data:\n\n```\n\n3. Start RabbitMQ:\n```bash\ndocker-compose up -d\n```\n\n## Project Structure\n\n```\nrabbitmq-go/\n│\n├── docker-compose.yml\n├── go.mod\n├── go.sum\n├── direct/\n│   ├── send/\n│   │   └── send.go\n│   └── receive/\n│       └── receive.go\n├── topic/\n│   ├── send/\n│   │   └── send.go\n│   └── receive/\n│       └── receive.go\n└── README.md\n```\n\n## Running the Application\n\n### Start RabbitMQ:\n```bash\ndocker-compose up -d\n```\n\n### Direct Exchange\n\n#### Build and run the consumer:\n```bash\ncd direct/receive\ngo run receive.go\n```\n\n#### In another terminal, run the producer:\n```bash\ncd direct/send\ngo run send.go \n```\n\n### Topic Exchange\n\n#### Build and run the consumer:\n```bash\ncd topic/receive\n# To create Q1 and bind it to \"*.data.*\"\ngo run receive.go Q1 \"*.data.*\"\n```\n\n#### In another terminal, run the consumer:\n```bash\ncd topic/receive\n# To create Q2 and bind it to \"*.*.temperature\" and \"sensor.#\"\ngo run receive.go Q2 \"*.*.temperature\" \"sensor.#\"\n```\n\n#### In another terminal, run the producer:\n```bash\ncd topic/send\ngo run send.go \"*.data.*\" 1 100 25 75 1200 7.2\ngo run send.go \"sensor.#\" 2 200 30 80 1500 8.5\ngo run send.go \"sensor.temperature\" 3 300 35 85 1800 9.8\ngo run send.go \"sensor.humidity\" 4 400 40 90 2100 10.5 \ngo run send.go \"error.data.tds\" 5 500 45 95 2400 11.2\ngo run send.go \"sensor.room1\" 6 600 50 100 2700 12.5\n```\n\n\n## Monitoring\n\nAccess the RabbitMQ Management Interface:\n- URL: http://localhost:15672\n- Username: guest\n- Password: guest\n\nHere you can monitor:\n- Message rates\n- Queue status\n- Exchange bindings\n- Consumer status\n- Connection details\n\n## Error Handling\n\nThe application includes error handling for:\n- Connection failures\n- Channel operations\n- Message publishing\n- Message consumption\n- JSON marshaling/unmarshaling\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhantbk%2Frabbitmq-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhantbk%2Frabbitmq-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhantbk%2Frabbitmq-go/lists"}