Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ability to pass 'properties' to Bunny session #276

Merged
merged 1 commit into from
Apr 15, 2017

Conversation

brianstorti
Copy link
Contributor

@brianstorti brianstorti commented Apr 12, 2017

With this change we will be able to define a properties property in the Sneakers configuration, that will be passed to Bunny when a connection is created.

Sneakers.configure({
  amqp: 'amqp://guest:guest@localhost:5672',
  properties: {
    key: "value",
    key2: "value2"
  }
})

This can be useful, for example, to identify where a connection is coming from, when we have dozens of applications using a RabbitMQ instance.

This is something that can already be done with Bunny:

Bunny.new(connection_string, { properties: { key: 'value' } })

So we are just leveraging that functionality when the connection is created from Sneakers.

These properties will be shown in the Management UI like this:

screenshot 2017-04-12 14 38 28

@michaelklishin
Copy link
Collaborator

Thank you. The goal of this PR makes sense. We'll test as time permits.

With this change we will be able to define a `properties` property in
the `Sneakers` configuration, that will be passed to `Bunny` when a
connection is created.

```ruby
Sneakers.configure({
  amqp: 'amqp://guest:guest@localhost:5672',
  properties: {
    key: "value",
    key2: "value2"
  }
})
```

This can be useful, for example, to identify where a connection is
coming from, when we have dozens of applications using a `RabbitMQ` instance.

This is something that can already be done with `Bunny`:

```ruby
Bunny.new(connection_string, { properties: { key: 'value' } })
```

So we are just leveraging that functionality when the connection is
created from `Sneakers`.
@brianstorti brianstorti force-pushed the pass-properties-to-bunny branch from 90fd20f to a412ccc Compare April 12, 2017 17:53
@michaelklishin michaelklishin merged commit c0456e2 into jondot:master Apr 15, 2017
@brianstorti brianstorti deleted the pass-properties-to-bunny branch April 17, 2017 10:55
@gabrieljoelc gabrieljoelc mentioned this pull request Aug 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants