Skip to content

ack/nack messages in github service#236

Open
PaulicStudios wants to merge 2 commits intodevfrom
235-acknack-messages-in-github-service
Open

ack/nack messages in github service#236
PaulicStudios wants to merge 2 commits intodevfrom
235-acknack-messages-in-github-service

Conversation

@PaulicStudios
Copy link
Member

No description provided.

@PaulicStudios PaulicStudios self-assigned this Sep 9, 2025
@PaulicStudios PaulicStudios linked an issue Sep 9, 2025 that may be closed by this pull request
@PaulicStudios PaulicStudios changed the title fix: update RabbitMQ service name to use underscores for consistency ack/nack messages in github service Sep 9, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates RabbitMQ service names from hyphenated to underscore format for consistency, while also adding error handling, message acknowledgment, and dead letter queue support to the GitHub service.

  • Updates queue names from hyphen-separated to underscore-separated format (e.g., "github-service-results" → "github_service_results")
  • Implements manual message acknowledgment and retry logic with dead letter queue support
  • Adds custom error classes for better GitHub API error handling

Reviewed Changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
github-service/src/main.ts Adds RabbitMQ configuration options and dead letter queue setup
github-service/src/githubApi/index.ts Exports new custom error classes
github-service/src/githubApi/client.ts Implements custom error classes for GitHub API responses
github-service/src/app.service.ts Updates queue name to use underscores
github-service/src/app.controller.ts Adds message acknowledgment and retry logic for all event handlers
api/src/main.ts Updates queue name to use underscores

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

data.repoTemplateName,
data.teamId
);
const channel = context.getChannelRef();
Copy link

Copilot AI Sep 9, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's inconsistent spacing in the indentation. This line has 7 spaces while other similar lines use 8 spaces for consistent indentation.

Copilot uses AI. Check for mistakes.
@PaulicStudios PaulicStudios requested review from Peu77 and removed request for Peu77 September 9, 2025 20:49
@PaulicStudios
Copy link
Member Author

okay @Peu77 there is another way to configure rabbitmq to handle the exchange into another queue after x amount of retires but you can not configure it in the code itself. So I would just stick to this approach

@Peu77
Copy link
Member

Peu77 commented Sep 9, 2025

okay @Peu77 there is another way to configure rabbitmq to handle the exchange into another queue after x amount of retires but you can not configure it in the code itself. So I would just stick to this approach

I'm sure you can configure it in the code, there must be a way

@PaulicStudios
Copy link
Member Author

okay @Peu77 there is another way to configure rabbitmq to handle the exchange into another queue after x amount of retires but you can not configure it in the code itself. So I would just stick to this approach

I'm sure you can configure it in the code, there must be a way

yes via the http api. But that is even worse code than like that xD

@Peu77
Copy link
Member

Peu77 commented Sep 10, 2025

okay @Peu77 there is another way to configure rabbitmq to handle the exchange into another queue after x amount of retires but you can not configure it in the code itself. So I would just stick to this approach

I'm sure you can configure it in the code, there must be a way

yes via the http api. But that is even worse code than like that xD

can we not just do it like this:

export const getRabbitmqConfig: any = (configService: ConfigService, queue: string) => {
return {
transport: Transport.RMQ,
options: {
urls: [configService.getOrThrow("RABBITMQ_URL")],
queue: queue,
queueOptions: {
arguments: {
"x-queue-type": "quorum",
"x-max-length": 10000,
"x-dead-letter-exchange": ${queue}_dlx,
"x-max-delivery-count": 3
}
},
noAck: false,
prefetchCount: 1,
retryAttempts: 3,
retryDelay: 1000
}
}
}

@PaulicStudios
Copy link
Member Author

okay @Peu77 there is another way to configure rabbitmq to handle the exchange into another queue after x amount of retires but you can not configure it in the code itself. So I would just stick to this approach

I'm sure you can configure it in the code, there must be a way

yes via the http api. But that is even worse code than like that xD

can we not just do it like this:

export const getRabbitmqConfig: any = (configService: ConfigService, queue: string) => { return { transport: Transport.RMQ, options: { urls: [configService.getOrThrow("RABBITMQ_URL")], queue: queue, queueOptions: { arguments: { "x-queue-type": "quorum", "x-max-length": 10000, "x-dead-letter-exchange": ${queue}_dlx, "x-max-delivery-count": 3 } }, noAck: false, prefetchCount: 1, retryAttempts: 3, retryDelay: 1000 } } }

I will try to do that

Copy link
Member

@Peu77 Peu77 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

test the solution I gave you

@Peu77
Copy link
Member

Peu77 commented Oct 24, 2025

okay @Peu77 there is another way to configure rabbitmq to handle the exchange into another queue after x amount of retires but you can not configure it in the code itself. So I would just stick to this approach

I'm sure you can configure it in the code, there must be a way

yes via the http api. But that is even worse code than like that xD

can we not just do it like this:
export const getRabbitmqConfig: any = (configService: ConfigService, queue: string) => { return { transport: Transport.RMQ, options: { urls: [configService.getOrThrow("RABBITMQ_URL")], queue: queue, queueOptions: { arguments: { "x-queue-type": "quorum", "x-max-length": 10000, "x-dead-letter-exchange": ${queue}_dlx, "x-max-delivery-count": 3 } }, noAck: false, prefetchCount: 1, retryAttempts: 3, retryDelay: 1000 } } }

I will try to do that

Is there any update here? Did you try that?

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.

ack/nack messages in github-service

2 participants