Skip to content

Commit

Permalink
Add new listener type
Browse files Browse the repository at this point in the history
  • Loading branch information
juancgalvis committed Feb 26, 2024
1 parent 4842d9b commit e401e94
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,14 @@ public enum SelectorMode {
}

public enum QueueType {
/**
* Used to get messages by selector
*/
FIXED,
/**
* This assumes that you have a location transparency router or have a single instance of this consumer
*/
FIXED_SINGLE_INSTANCE,
TEMPORARY
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
import org.springframework.context.annotation.FilterType;

@Configuration
@ComponentScan(basePackages = "co.com.bancolombia.jms.sample.domain.usecase",
@ComponentScan(basePackages = "co.com.bancolombia.sample.domain.usecase",
includeFilters = {
@ComponentScan.Filter(type = FilterType.REGEX, pattern = "^.+UseCase$")
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
@AllArgsConstructor
public class MyRequestReplyAdapter implements RequestGateway {
private final MyRequestReply requestReply; // domainB
private final MyRequestReplySingleInstance requestReplyFixedSingle; // domainB fixed single instance (no selector)
private final MyRequestReplyTmp requestReplyTmp; // default domain
private final ObjectMapper mapper;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package co.com.bancolombia.sample.drivenadapters.reqreply;

import co.com.bancolombia.commons.jms.api.MQRequestReply;
import co.com.bancolombia.commons.jms.mq.ReqReply;

import static co.com.bancolombia.commons.jms.internal.models.MQListenerConfig.QueueType.FIXED;
import static co.com.bancolombia.commons.jms.internal.models.MQListenerConfig.QueueType.FIXED_SINGLE_INSTANCE;

@ReqReply(requestQueue = "DEV.QUEUE.1", replyQueue = "DEV.QUEUE.2", queueType = FIXED_SINGLE_INSTANCE, connectionFactory = "domainB")
public interface MyRequestReplySingleInstance extends MQRequestReply {
}
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
version=2.0.1
springBootVersion=3.2.1
version=2.0.2
springBootVersion=3.2.3
gradleVersionsVersion=0.47.0
owaspDependencyCheckVersion=9.0.9
mqJMSVersion=3.2.1
Expand Down

0 comments on commit e401e94

Please sign in to comment.