Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Add support for RabbitMQ streams

Open
#354 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
java, rabbitmq
Domain
backend, cloud

Research direction

Start by locating the RabbitMQ service-binding parser and its tests, then trace how the credentials.protocols map is converted into Spring properties. Done means rabbitmq-stream values populate the stream host, port, username, password, and virtual-host instead of localhost or null, with coverage for the supplied VCAP_SERVICES shape.

Written by the indexing model from the issue text.

Description

enhancement
Is your feature request related to a problem? Please describe.

Spring properties for RabbitMQ stream protocol are not being populated and an error is raised with connection failing to localhost. Adding some custom beans and debugging info, this is what the properties that are being set look like (all properties prefixed with spring.rabbitmq.):

host: q-s0.rabbitmq-server.<some-domain>.service-instance-756e8a51-f5be-4e39-9aef-511a958b4d1e.bosh
port: null
username: be35bc61-2b67-47d4-b53a-45f9bc2d63bf
password: ***SET***
virtualHost: 756e8a51-f5be-4e39-9aef-511a958b4d1e
stream.host: localhost
stream.port: 5552
stream.username: null
stream.password: null
stream.virtual-host: null

This is how the VCAP_SERVICES property looks like (notice rabbitmq-stream is under a protocols map)


 {
  "p.rabbitmq": [
    {
      "binding_guid": "be35bc61-2b67-47d4-b53a-45f9bc2d63bf",
      "binding_name": null,
      "credentials": {
        "dashboard_url": "https://dashboard-url",
        "hostname": "q-s0.rabbitmq-server.<some-domain>.service-instance-756e8a51-f5be-4e39-9aef-511a958b4d1e.bosh",
        "hostnames": [
          "q-s0.rabbitmq-server.some-domain.service-instance-756e8a51-f5be-4e39-9aef-511a958b4d1e.bosh"
        ],
        "http_api_uri": "https://be35bc61-2b67-47d4-b53a-45f9bc2d63bf:dAZmAYu8xuMb5qahvmD2bDGI@rmq-756e8a51-f5be-4e39-9aef-511a958b4d1e.<sys-domain>/api/",
        "http_api_uris": [
          "https://be35bc61-2b67-47d4-b53a-45f9bc2d63bf:dAZmAYu8xuMb5qahvmD2bDGI@rmq-756e8a51-f5be-4e39-9aef-511a958b4d1e.<sys-domain>/api/"
        ],
        "password": "dAZmAYu8xuMb5qahvmD2bDGI",
        "protocols": {
          "amqp": {
            "host": "q-s0.rabbitmq-server.<some-domain>.service-instance-756e8a51-f5be-4e39-9aef-511a958b4d1e.bosh",
            "hosts": [
              "q-s0.rabbitmq-server.<some-domain>.service-instance-756e8a51-f5be-4e39-9aef-511a958b4d1e.bosh"
            ],
            "password": "dAZmAYu8xuMb5qahvmD2bDGI",
            "port": 5672,
            "ssl": false,
            "uri": "amqp://be35bc61-2b67-47d4-b53a-45f9bc2d63bf:[email protected].<some-domain>.service-instance-756e8a51-f5be-4e39-9aef-511a958b4d1e.bosh/756e8a51-f5be-4e39-9aef-511a958b4d1e",
            "uris": [
              "amqp://be35bc61-2b67-47d4-b53a-45f9bc2d63bf:[email protected].<some-domain>.service-instance-756e8a51-f5be-4e39-9aef-511a958b4d1e.bosh/756e8a51-f5be-4e39-9aef-511a958b4d1e"
            ],
            "username": "be35bc61-2b67-47d4-b53a-45f9bc2d63bf",
            "vhost": "756e8a51-f5be-4e39-9aef-511a958b4d1e"
          },
          "rabbitmq-stream": {
            "host": "q-s0.rabbitmq-server.<some-domain>.service-instance-756e8a51-f5be-4e39-9aef-511a958b4d1e.bosh",
            "hosts": [
              "q-s0.rabbitmq-server.<some-domain>.service-instance-756e8a51-f5be-4e39-9aef-511a958b4d1e.bosh"
            ],
            "password": "dAZmAYu8xuMb5qahvmD2bDGI",
            "port": 5552,
            "ssl": false,
            "uri": "rabbitmq-stream://be35bc61-2b67-47d4-b53a-45f9bc2d63bf:[email protected].<some-domain>.service-instance-756e8a51-f5be-4e39-9aef-511a958b4d1e.bosh:5552/756e8a51-f5be-4e39-9aef-511a958b4d1e",
            "uris": [
              "rabbitmq-stream://be35bc61-2b67-47d4-b53a-45f9bc2d63bf:[email protected].<some-domain>.service-instance-756e8a51-f5be-4e39-9aef-511a958b4d1e.bosh:5552/756e8a51-f5be-4e39-9aef-511a958b4d1e"
            ],
            "username": "be35bc61-2b67-47d4-b53a-45f9bc2d63bf",
            "vhost": "756e8a51-f5be-4e39-9aef-511a958b4d1e"
          }
        },
        "ssl": false,
        "uri": "amqp://be35bc61-2b67-47d4-b53a-45f9bc2d63bf:[email protected].<some-domain>.service-instance-756e8a51-f5be-4e39-9aef-511a958b4d1e.bosh/756e8a51-f5be-4e39-9aef-511a958b4d1e",
        "uris": [
          "amqp://be35bc61-2b67-47d4-b53a-45f9bc2d63bf:[email protected].<some-domain>.service-instance-756e8a51-f5be-4e39-9aef-511a958b4d1e.bosh/756e8a51-f5be-4e39-9aef-511a958b4d1e"
        ],
        "username": "be35bc61-2b67-47d4-b53a-45f9bc2d63bf",
        "vhost": "756e8a51-f5be-4e39-9aef-511a958b4d1e"
      },
      "instance_guid": "756e8a51-f5be-4e39-9aef-511a958b4d1e",
      "instance_name": "audit-events",
      "label": "p.rabbitmq",
      "name": "audit-events",
      "plan": "on-demand-plan",
      "provider": null,
      "syslog_drain_url": null,
      "tags": [
        "rabbitmq"
      ],
      "volume_mounts": []
    }
  ]
}
```

### Describe the solution you'd like

I'd like the right properties to be filled in when the stream plugin is enabled in rabbit so autowiring sucessfully sets up the boot beans.

### Describe alternatives you've considered

_No response_

### Additional context

_No response_
Dominant language
Java
Stars
97
Forks
64
Avg merge
6h 36m
Merged PRs (30d)
6

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from pivotal-cf/java-cfenv

All issues in pivotal-cf/java-cfenv

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.