Package com.zanox.rabbiteasy.publisher

Examples of com.zanox.rabbiteasy.publisher.MessagePublisher


        if (! publisherConfigurations.containsKey(eventType)) {
            LOGGER.debug("No publisher configured for event of type {}", eventType.getSimpleName());
            return;
        }
        PublisherConfiguration publisherConfiguration = publisherConfigurations.get(eventType);
        MessagePublisher publisher = providePublisher(publisherConfiguration.reliability, eventType);
        Message message = buildMessage(publisherConfiguration, event);
        try {
            LOGGER.info("Publishing event of type {}", eventType.getSimpleName());
            publisher.publish(message, publisherConfiguration.deliveryOptions);
            LOGGER.info("Successfully published event of type {}", eventType.getSimpleName());
        } catch (IOException e) {
            LOGGER.error("Failed to publish event {}", eventType.getSimpleName(), e);
            throw e;
        }
View Full Code Here


        Map<Class<?>, MessagePublisher> localPublishers = publishers.get();
        if (localPublishers == null) {
            localPublishers = new HashMap<Class<?>, MessagePublisher>();
            publishers.set(localPublishers);
        }
        MessagePublisher publisher = localPublishers.get(eventType);
        if (publisher == null) {
            publisher = new GenericPublisher(connectionFactory, reliability);
            localPublishers.put(eventType, publisher);
        }
        return publisher;
View Full Code Here

TOP

Related Classes of com.zanox.rabbiteasy.publisher.MessagePublisher

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.