Skip to content

Commit

Permalink
Fix fake consumer
Browse files Browse the repository at this point in the history
  • Loading branch information
kibertoad committed Oct 15, 2023
1 parent 0ebf5e8 commit 0e85626
Showing 1 changed file with 20 additions and 15 deletions.
35 changes: 20 additions & 15 deletions packages/amqp/test/fakes/FakeConsumerMultiSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,29 +5,34 @@ import { AbstractAmqpConsumerMultiSchema } from '../../lib/AbstractAmqpConsumerM
import type { AMQPConsumerDependencies } from '../../lib/AbstractAmqpService'
import type { CommonMessage } from '../../lib/types/MessageTypes'

export class FakeConsumerMultiSchema extends AbstractAmqpConsumerMultiSchema<
export class FakeConsumerMultiSchema<ExecutionContext> extends AbstractAmqpConsumerMultiSchema<
CommonMessage,
FakeConsumerMultiSchema
ExecutionContext
> {
constructor(
dependencies: AMQPConsumerDependencies,
queueName = 'dummy',
handlers: MessageHandlerConfig<CommonMessage, FakeConsumerMultiSchema>[],
handlers: MessageHandlerConfig<CommonMessage, ExecutionContext>[],
executionContext: ExecutionContext,
) {
super(dependencies, {
creationConfig: {
queueName: queueName,
queueOptions: {
durable: true,
autoDelete: false,
super(
dependencies,
{
creationConfig: {
queueName: queueName,
queueOptions: {
durable: true,
autoDelete: false,
},
},
deletionConfig: {
deleteIfExists: true,
},
handlers,
messageTypeField: 'messageType',
},
deletionConfig: {
deleteIfExists: true,
},
handlers,
messageTypeField: 'messageType',
})
executionContext,
)
}

processMessage(): Promise<Either<'retryLater', 'success'>> {
Expand Down

0 comments on commit 0e85626

Please sign in to comment.