-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests: additional RabbitListener tests
- Loading branch information
Pascal Dal Farra
committed
Jun 5, 2024
1 parent
65fed2d
commit 8c0950e
Showing
7 changed files
with
291 additions
and
30 deletions.
There are no files selected for viewing
44 changes: 37 additions & 7 deletions
44
...ringwolf-amqp-example/src/main/java/io/github/springwolf/examples/amqp/AmqpConstants.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,45 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
package io.github.springwolf.examples.amqp; | ||
|
||
public class AmqpConstants { | ||
import lombok.AccessLevel; | ||
import lombok.NoArgsConstructor; | ||
|
||
public static final String EXAMPLE_TOPIC_EXCHANGE = "example-topic-exchange"; | ||
@NoArgsConstructor(access = AccessLevel.PRIVATE) | ||
public final class AmqpConstants { | ||
|
||
public static final String EXAMPLE_TOPIC_ROUTING_KEY = "example-topic-routing-key"; | ||
// Exchanges | ||
|
||
public static final String EXAMPLE_QUEUE = "example-queue"; | ||
public static final String ANOTHER_QUEUE = "another-queue"; | ||
public static final String MULTI_PAYLOAD_QUEUE = "multi-payload-queue"; | ||
public static final String EXCHANGE_EXAMPLE_TOPIC_EXCHANGE = "example-topic-exchange"; | ||
public static final String EXCHANGE_CRUD_TOPIC_EXCHANGE_1 = "CRUD-topic-exchange-1"; | ||
public static final String EXCHANGE_CRUD_TOPIC_EXCHANGE_2 = "CRUD-topic-exchange-2"; | ||
/** | ||
* Direct Exchange - Routing is based on 'Routing key'. | ||
* Messages are 'routed' towards queue which name is equals to 'routing key' <BR/> | ||
* Note:<BR/> | ||
* The 'Default exchange' is a 'Direct exchange' with an empty name ( name= "") | ||
*/ | ||
public static final String EXCHANGE_DEFAULT_EXCHANGE = ""; | ||
|
||
public static final String EXAMPLE_BINDINGS_QUEUE = "example-bindings-queue"; | ||
// Routing keys | ||
|
||
/** | ||
* When a queue is bound with "#" (hash) binding key, | ||
* it will receive all the messages, regardless of the routing key - like in fanout exchange. | ||
*/ | ||
public static final String ROUTING_KEY_ALL_MESSAGES = "#"; | ||
|
||
public static final String ROUTING_KEY_CRUD = "crud-routing-key"; | ||
public static final String ROUTING_KEY_EXAMPLE_TOPIC_ROUTING_KEY = "example-topic-routing-key"; | ||
|
||
// Queues | ||
|
||
public static final String QUEUE_EXAMPLE_QUEUE = "example-queue"; | ||
public static final String QUEUE_ANOTHER_QUEUE = "another-queue"; | ||
public static final String QUEUE_MULTI_PAYLOAD_QUEUE = "multi-payload-queue"; | ||
public static final String QUEUE_EXAMPLE_BINDINGS_QUEUE = "example-bindings-queue"; | ||
|
||
public static final String QUEUE_CREATE = "queue-create"; | ||
public static final String QUEUE_READ = "queue-read"; | ||
public static final String QUEUE_DELETE = "queue-delete"; | ||
public static final String QUEUE_UPDATE = "queue-update"; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...amqp-example/src/main/java/io/github/springwolf/examples/amqp/dtos/GenericPayloadDto.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// SPDX-License-Identifier: Apache-2.0 | ||
package io.github.springwolf.examples.amqp.dtos; | ||
|
||
import io.swagger.v3.oas.annotations.media.Schema; | ||
import lombok.AllArgsConstructor; | ||
import lombok.Data; | ||
import lombok.NoArgsConstructor; | ||
|
||
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED; | ||
|
||
@Schema(description = "Generic payload model") | ||
@Data | ||
@AllArgsConstructor | ||
@NoArgsConstructor | ||
public class GenericPayloadDto<T> { | ||
|
||
@Schema(description = "Generic Payload field", requiredMode = REQUIRED) | ||
private T genericValue; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.