Skip to content

Commit

Permalink
[SDK-3336] - exchange Parameter for AmqpExternalTarget struct
Browse files Browse the repository at this point in the history
Add the `exchange` parameter to the `AmqpExternalTarget` struct. This has been implemented in the Control API and will be exposed in the Ably Terraform provider.
  • Loading branch information
graham-russell committed Dec 11, 2023
1 parent 67578f1 commit 164517f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,10 @@ type AmqpExternalTarget struct {
// physical queue. See this Ably knowledge base article for details.
// https://knowledge.ably.com/what-is-the-format-of-the-routingkey-for-an-amqp-or-kinesis-reactor-rule
RoutingKey string `json:"routingKey,omitempty"`
// The RabbitMQ exchange, if needed supports interpolation;
// see https://faqs.ably.com/what-is-the-format-of-the-routingkey-for-an-amqp-or-kinesis-reactor-rule
// for more info. If you don't use RabbitMQ exchanges, leave this blank.
Exchange string `json:"exchange,omitempty"`
// Reject delivery of the message if the route does not exist, otherwise fail silently.
MandatoryRoute bool `json:"mandatoryRoute"`
// Marks the message as persistent, instructing the broker to write it to disk if it is in a durable queue.
Expand Down
1 change: 1 addition & 0 deletions rules_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ func TestRuleAmqpExtrernal(t *testing.T) {
target := &AmqpExternalTarget{
Url: "amqps://test.com",
RoutingKey: "key",
Exchange: "exchange",
MandatoryRoute: true,
PersistentMessages: true,
MessageTTL: 50,
Expand Down

0 comments on commit 164517f

Please sign in to comment.