Skip to content

Commit

Permalink
Test branch to force message timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
mfcrocker committed Sep 28, 2023
1 parent b7666dd commit 632bda6
Showing 1 changed file with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,29 @@
@Component
public class CaseCreationReceiver {
private static final Logger log = LoggerFactory.getLogger(CaseCreationReceiver.class);
@Autowired private ObjectMapper objectMapper;
@Autowired private CaseService caseService;
@Autowired AppConfig appConfig;
@Autowired
private ObjectMapper objectMapper;
@Autowired
private CaseService caseService;
@Autowired
AppConfig appConfig;

/**
* To process SampleUnitParents read from pubsub This creates application ready event listener to
* provide a active subscription for the new case creation against the receiving SampleUnitParents
* To process SampleUnitParents read from pubsub This creates application ready
* event listener to
* provide a active subscription for the new case creation against the receiving
* SampleUnitParents
*/
@ServiceActivator(inputChannel = "caseCreationChannel")
public void messageReceiver(
Message message,
@Header(GcpPubSubHeaders.ORIGINAL_MESSAGE) BasicAcknowledgeablePubsubMessage pubSubMsg) {
String messageId = pubSubMsg.getPubsubMessage().getMessageId();
try {
Thread.sleep(1500);
} catch (InterruptedException e) {
e.printStackTrace();
}
log.with("messageId", messageId).info("Receiving message ID from PubSub");
String payload = new String((byte[]) message.getPayload());
log.with("payload", payload).info("New request for case notification");
Expand Down

0 comments on commit 632bda6

Please sign in to comment.