Search in sources :

Example 1 with JacksonPubSubMessageConverter

use of org.springframework.cloud.gcp.pubsub.support.converter.JacksonPubSubMessageConverter in project spring-cloud-gcp by spring-cloud.

the class PubSubTemplateTests method createPublisherTemplate.

private PubSubPublisherTemplate createPublisherTemplate() {
    PubSubPublisherTemplate pubSubPublisherTemplate = new PubSubPublisherTemplate(this.mockPublisherFactory);
    pubSubPublisherTemplate.setMessageConverter(new JacksonPubSubMessageConverter(new ObjectMapper()));
    return pubSubPublisherTemplate;
}
Also used : PubSubPublisherTemplate(org.springframework.cloud.gcp.pubsub.core.publisher.PubSubPublisherTemplate) JacksonPubSubMessageConverter(org.springframework.cloud.gcp.pubsub.support.converter.JacksonPubSubMessageConverter) ObjectMapper(com.fasterxml.jackson.databind.ObjectMapper)

Aggregations

ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)1 PubSubPublisherTemplate (org.springframework.cloud.gcp.pubsub.core.publisher.PubSubPublisherTemplate)1 JacksonPubSubMessageConverter (org.springframework.cloud.gcp.pubsub.support.converter.JacksonPubSubMessageConverter)1