Skip to content

Commit 350d1ae

Browse files
author
magne
committed
feat: using github version of rhea package
1 parent 13affaa commit 350d1ae

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

package-lock.json

Lines changed: 2 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,6 @@
6161
"vitest": "^3.2.1"
6262
},
6363
"dependencies": {
64-
"rhea": "^3.0.4"
64+
"rhea": "github:amqp/rhea"
6565
}
6666
}

test/e2e/consumer.test.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -236,12 +236,11 @@ describe("Consumer", () => {
236236
body: expectedBody,
237237
})
238238
)
239-
const symKey = Symbol.for("x-opt-annotation-key")
240239
let receivedAnnotationValue: string | undefined = ""
241240
const consumer = await connection.createConsumer({
242241
queue: { name: discardQueueName },
243242
messageHandler: (context) => {
244-
context.discard({ [symKey]: "annotation-value" })
243+
context.discard({ "x-opt-annotation-key": "annotation-value" })
245244
},
246245
})
247246
consumer.start()
@@ -252,9 +251,8 @@ describe("Consumer", () => {
252251
const consumerDeadLetter = await connection.createConsumer({
253252
queue: { name: deadLetterQueueName },
254253
messageHandler: (context, message) => {
255-
console.log("A", message.message_annotations)
256254
receivedAnnotationValue = message.message_annotations
257-
? message.message_annotations[symKey as unknown as string]
255+
? message.message_annotations["x-opt-annotation-key"]
258256
: undefined
259257
context.accept()
260258
},

0 commit comments

Comments
 (0)