-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #115 from AAFC-BICoE/33662_update_dina-base_to_0.124
33662 Update dina-base to 0.124
- Loading branch information
Showing
4 changed files
with
60 additions
and
4 deletions.
There are no files selected for viewing
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
14 changes: 14 additions & 0 deletions
14
src/main/java/ca/gc/aafc/agent/api/config/SearchQueueProperties.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,14 @@ | ||
package ca.gc.aafc.agent.api.config; | ||
|
||
import javax.inject.Named; | ||
|
||
import org.springframework.boot.context.properties.ConfigurationProperties; | ||
import org.springframework.stereotype.Component; | ||
|
||
import ca.gc.aafc.dina.messaging.config.RabbitMQQueueProperties; | ||
|
||
@ConfigurationProperties(prefix = "rabbitmq") | ||
@Component | ||
@Named("searchQueueProperties") | ||
public class SearchQueueProperties extends RabbitMQQueueProperties { | ||
} |
34 changes: 34 additions & 0 deletions
34
src/main/java/ca/gc/aafc/agent/api/messaging/SearchRabbitMQMessageProducer.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,34 @@ | ||
package ca.gc.aafc.agent.api.messaging; | ||
|
||
import javax.inject.Named; | ||
|
||
import org.springframework.amqp.rabbit.core.RabbitTemplate; | ||
import org.springframework.beans.factory.annotation.Autowired; | ||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; | ||
import org.springframework.stereotype.Service; | ||
|
||
import ca.gc.aafc.dina.messaging.config.RabbitMQQueueProperties; | ||
import ca.gc.aafc.dina.messaging.message.DocumentOperationNotification; | ||
import ca.gc.aafc.dina.messaging.producer.DocumentOperationNotificationMessageProducer; | ||
import ca.gc.aafc.dina.messaging.producer.RabbitMQMessageProducer; | ||
|
||
/** | ||
* RabbitMQ based message producer | ||
*/ | ||
@Service | ||
@ConditionalOnProperty(prefix = "dina.messaging", name = "isProducer", havingValue = "true") | ||
public class SearchRabbitMQMessageProducer extends RabbitMQMessageProducer implements | ||
DocumentOperationNotificationMessageProducer { | ||
|
||
@Autowired | ||
public SearchRabbitMQMessageProducer(RabbitTemplate rabbitTemplate, | ||
@Named("searchQueueProperties") | ||
RabbitMQQueueProperties queueProperties) { | ||
super(rabbitTemplate, queueProperties); | ||
} | ||
|
||
@Override | ||
public void send(DocumentOperationNotification message) { | ||
super.send(message); | ||
} | ||
} |