Created
May 6, 2015 16:05
-
-
Save timjstewart/4dadfcc13ba213213f93 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| public void create(final Request request, final Response response) throws Exception { | |
| SubPubMessage subPubMessage = null; | |
| try { | |
| subPubMessage = SubPubMessage.fromFormPost(request); | |
| } catch (Exception e) { | |
| log.error("Could not parse SubPub message, message not ack'd from SubPub.", e); | |
| throw new Exception("Could not parse SubPub message, message not ack'd from SubPub.", e); | |
| } | |
| try { | |
| kafkaService.sendKafkaMessage(config.getTopicName(), subPubMessage.getPayload(), subPubMessage.getMessageType()); | |
| countsClient.incrementGambitCount(KAFKA_MSG); | |
| } catch (Exception e) { | |
| log.error("Could not send to Kafka, message not ack'd from SubPub.", e); | |
| throw new Exception("Could not send to Kafka, message not ack'd from SubPub.", e); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment