Skip to content

Commit

Permalink
Merge pull request #470 from lohithpc1/property-feature
Browse files Browse the repository at this point in the history
Adding properties field to activemq.go
  • Loading branch information
SukanyaHanumanthu authored Nov 16, 2022
2 parents 0f46684 + 35709c2 commit 666b0d8
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions events/activemq.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ type ActiveMQMessage struct {
Data string `json:"data"`
BrokerInTime int64 `json:"brokerInTime"`
BrokerOutTime int64 `json:"brokerOutTime"`
Properties map[string]string `json:"properties"`
}

type ActiveMQDestination struct {
Expand Down
1 change: 1 addition & 0 deletions events/activemq_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ func TestActiveMQEventMarshaling(t *testing.T) {
assert.Equal(t, 1, message.DeliveryMode)
assert.Equal(t, "testQueue", message.Destination.PhysicalName)
assert.Equal(t, false, message.Redelivered)
assert.Equal(t, "testValue", message.Properties["testKey"])

// 4. serialize to JSON
outputJSON, err := json.Marshal(inputEvent)
Expand Down
3 changes: 2 additions & 1 deletion events/testdata/activemq-event.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
"priority": 0,
"data": "RW50ZXIgc29tZSB0ZXh0IGhlcmUgZm9yIHRoZSBtZXNzYWdlIGJvZHkuLi4=",
"brokerInTime": 1599863938943,
"brokerOutTime": 1599863938944
"brokerOutTime": 1599863938944,
"properties": {"testKey": "testValue"}
}
]
}

0 comments on commit 666b0d8

Please sign in to comment.