Skip to content

Commit c49d008

Browse files
authored
Rename Match Queue (#88)
* Rename match queue * oops
1 parent 86d2601 commit c49d008

File tree

5 files changed

+8
-8
lines changed

5 files changed

+8
-8
lines changed

services/match/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -225,10 +225,10 @@ docker compose down -v
225225

226226
## Producers
227227

228-
### Match Request Updated Producer
228+
### Match Request Created Producer
229229

230230
- This producer emits a message when a match request has been created or updated.
231-
- **Queue**: `MATCH_REQUEST_UPDATED`
231+
- **Queue**: `MATCH_REQUEST_CREATED`
232232
- **Data Produced**
233233
- `user` - The user associated with the created or updated match request.
234234
- `topics` - The topics of the created or updated match request.
@@ -279,12 +279,12 @@ docker compose down -v
279279

280280
## Consumers
281281

282-
### Match Request Updated Consumer
282+
### Match Request Created Consumer
283283

284284
- This consumer attempts to find and assign a compatible match request based on their preferences (topics and difficulty) upon the update of a given match request.
285285
- Two match requests are said to be compatible if they share the same difficulty and have at least one topic in common.
286286
- Upon successfully finding a match, it produces a `MATCH_FOUND` event.
287-
- **Queue**: `MATCH_REQUEST_UPDATED` - This message is emitted when a match request is created or updated.
287+
- **Queue**: `MATCH_REQUEST_CREATED` - This message is emitted when a match request is created or updated.
288288
- **Data Consumed**
289289
- `user` - The user associated with the created or updated match request.
290290
- `topics` - The topics of the created or updated match request.

services/match/src/events/consumer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ async function consumeMatchFailed(msg: MatchFailedEvent) {
5555
}
5656

5757
export async function initializeConsumers() {
58-
messageBroker.consume(Queues.MATCH_REQUEST_UPDATED, consumeMatchUpdated);
58+
messageBroker.consume(Queues.MATCH_REQUEST_CREATED, consumeMatchUpdated);
5959
messageBroker.consume(Queues.COLLAB_CREATED, consumeCollabCreated);
6060
messageBroker.consume(Queues.MATCH_FAILED, consumeMatchFailed);
6161
}

services/match/src/events/producer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export async function produceMatchUpdatedRequest(
1616
topics,
1717
difficulty,
1818
};
19-
await messageBroker.produce(Queues.MATCH_REQUEST_UPDATED, message);
19+
await messageBroker.produce(Queues.MATCH_REQUEST_CREATED, message);
2020
}
2121

2222
export async function produceMatchFound(user1: any, user2: any, topics: string[], difficulty: Difficulty) {

services/match/src/events/queues.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export enum Queues {
2-
MATCH_REQUEST_UPDATED = 'MATCH_REQUEST_UPDATED',
2+
MATCH_REQUEST_CREATED = 'MATCH_REQUEST_CREATED',
33
MATCH_FOUND = 'MATCH_FOUND',
44
QUESTION_FOUND = 'QUESTION_FOUND',
55
COLLAB_CREATED = 'COLLAB_CREATED',

services/question/src/events/queues.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export enum Queues {
2-
MATCH_REQUEST_UPDATED = 'MATCH_REQUEST_UPDATED',
2+
MATCH_REQUEST_CREATED = 'MATCH_REQUEST_CREATED',
33
MATCH_FOUND = 'MATCH_FOUND',
44
QUESTION_FOUND = 'QUESTION_FOUND',
55
COLLAB_CREATED = 'COLLAB_CREATED',

0 commit comments

Comments
 (0)