Skip to content

Commit

Permalink
Merge branch 'release/v2.4.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
shiido committed Jun 22, 2022
2 parents 54d7b8d + 28f459f commit 78081ba
Show file tree
Hide file tree
Showing 6 changed files with 68 additions and 9 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,5 @@ build/

### VS Code ###
.vscode/

newrelic.yml
12 changes: 9 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,23 @@
FROM openjdk:11

ARG XMX=1024m
ARG XMX=4096m
ARG PROFILE=production
ARG CLOUD_CONFIG
ARG ILI_QUEUE
ARG NEW_RELIC_ENVIRONMENT

ENV XMX=$XMX
ENV PROFILE=$PROFILE
ENV CLOUD_CONFIG=$CLOUD_CONFIG
ENV ILI_QUEUE=$ILI_QUEUE
ENV NEW_RELIC_ENVIRONMENT=$NEW_RELIC_ENVIRONMENT

VOLUME /tmp

ADD ./target/st-microservice-ili-2.2.0.jar st-microservice-ili.jar
ADD ./target/st-microservice-ili-2.4.2.jar st-microservice-ili.jar
ADD ./target/newrelic.jar newrelic.jar
ADD ./newrelic.yml newrelic.yml

EXPOSE 8080

ENTRYPOINT java -Xmx$XMX -jar /st-microservice-ili.jar --spring.profiles.active=$PROFILE --spring.cloud.config.uri=$CLOUD_CONFIG
ENTRYPOINT java -javaagent:/newrelic.jar -Dnewrelic.environment=$NEW_RELIC_ENVIRONMENT -Xmx$XMX -jar /st-microservice-ili.jar --spring.profiles.active=$PROFILE --spring.cloud.config.uri=$CLOUD_CONFIG --st.rabbitmq.queueInstance=$ILI_QUEUE
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<groupId>com.ai.st.microservice.ili</groupId>
<artifactId>st-microservice-ili</artifactId>
<version>2.4.0</version>
<version>2.4.2</version>
<name>st-microservice-ili</name>
<description>Microservice ILI</description>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -250,10 +250,58 @@ public DirectExchange exchangeResultProcessSinicFilesName() {
return new DirectExchange(queueResultProcessSinicFilesExchange);
}

// queue ili sinic large

@Value("${st.rabbitmq.queueIliSinicLarge.queue}")
public String queueIliSinicLargeName;

@Value("${st.rabbitmq.queueIliSinicLarge.exchange}")
public String exchangeIliSinicLargeName;

@Value("${st.rabbitmq.queueIliSinicLarge.routingkey}")
public String routingkeyIliSinicLargeName;

@Bean
public Queue queueIliSinicLargeName() {
return new Queue(queueIliSinicLargeName, false);
}

@Bean
public DirectExchange exchangeIliSinicLargeName() {
return new DirectExchange(exchangeIliSinicLargeName);
}

@Bean
public Binding bindingIliSinicLargeName() {
return BindingBuilder.bind(queueIliSinicLargeName()).to(exchangeIliSinicLargeName())
.with(routingkeyIliSinicLargeName);
}

// queue ili sinic small

@Value("${st.rabbitmq.queueIliSinicSmall.queue}")
public String queueIliSinicSmallName;

@Value("${st.rabbitmq.queueIliSinicSmall.exchange}")
public String exchangeIliSinicSmallName;

@Value("${st.rabbitmq.queueIliSinicSmall.routingkey}")
public String routingkeyIliSinicSmallName;

@Bean
public Queue queueIliSinicSmallName() {
return new Queue(queueIliSinicSmallName, false);
}

@Bean
public DirectExchange exchangeIliSinicSmallName() {
return new DirectExchange(exchangeIliSinicSmallName);
}

@Bean
public Binding bindingResultProcessSinicFilesName() {
return BindingBuilder.bind(queueResultProcessSinicFilesName()).to(exchangeResultProcessSinicFilesName())
.with(queueResultProcessSinicFilesRoutingKey);
public Binding bindingIliSinicSmallName() {
return BindingBuilder.bind(queueIliSinicSmallName()).to(exchangeIliSinicSmallName())
.with(routingkeyIliSinicSmallName);
}

// Setup
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ public class RabbitMQIliListener {
@Autowired
private VersionBusiness versionBusiness;

@RabbitListener(queues = "${st.rabbitmq.queueIli.queue}", concurrency = "${st.rabbitmq.queueIli.concurrency}")
@RabbitListener(queues = "${st.rabbitmq.queueInstance}", concurrency = "1")
public void iliProcess(IliProcessQueueDto data) {

log.info("ili process started");
Expand Down
5 changes: 4 additions & 1 deletion src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,7 @@ server:

iliProcesses:
srs: "9377"


st:
rabbitmq:
queueInstance: st.queue.ili

0 comments on commit 78081ba

Please sign in to comment.