sendOneEncoderPatternMessage(rabbitTemplate, routingKey); doSend(rabbitTemplate, event, logEvent, name, amqpProps, routingKey);
sendOneEncoderPatternMessage(rabbitTemplate, routingKey); doSend(rabbitTemplate, event, logEvent, name, amqpProps, routingKey);
if (AmqpAppender.this.abbreviator != null && logEvent instanceof LoggingEvent) { ((LoggingEvent) logEvent).setLoggerName(AmqpAppender.this.abbreviator.abbreviate(name)); msgBody = encodeMessage(logEvent); ((LoggingEvent) logEvent).setLoggerName(name); msgBody = encodeMessage(logEvent);
if (AmqpAppender.this.abbreviator != null && logEvent instanceof LoggingEvent) { ((LoggingEvent) logEvent).setLoggerName(AmqpAppender.this.abbreviator.abbreviate(name)); msgBody = encodeMessage(logEvent); ((LoggingEvent) logEvent).setLoggerName(name); msgBody = encodeMessage(logEvent);
@Override public void start() { this.events = createEventQueue(); ConnectionFactory rabbitConnectionFactory = createRabbitConnectionFactory(); if (rabbitConnectionFactory != null) { super.start(); this.routingKeyLayout.setPattern(this.routingKeyLayout.getPattern() .replaceAll("%property\\{applicationId\\}", this.applicationId)); this.routingKeyLayout.setContext(getContext()); this.routingKeyLayout.start(); this.locationLayout.setContext(getContext()); this.locationLayout.start(); this.connectionFactory = new CachingConnectionFactory(rabbitConnectionFactory); if (StringUtils.hasText(this.connectionName)) { this.connectionFactory.setConnectionNameStrategy(cf -> this.connectionName); } if (this.addresses != null) { this.connectionFactory.setAddresses(this.addresses); } ConnectionFactoryConfigurationUtils.updateClientConnectionProperties(this.connectionFactory, this.clientConnectionProperties); updateConnectionClientProperties(this.connectionFactory.getRabbitConnectionFactory().getClientProperties()); setUpExchangeDeclaration(); this.senderPool = Executors.newCachedThreadPool(); for (int i = 0; i < this.senderPoolSize; i++) { this.senderPool.submit(new EventSender()); } } }
@Override public void start() { this.events = createEventQueue(); ConnectionFactory rabbitConnectionFactory = createRabbitConnectionFactory(); if (rabbitConnectionFactory != null) { super.start(); this.routingKeyLayout.setPattern(this.routingKeyLayout.getPattern() .replaceAll("%property\\{applicationId\\}", this.applicationId)); this.routingKeyLayout.setContext(getContext()); this.routingKeyLayout.start(); this.locationLayout.setContext(getContext()); this.locationLayout.start(); this.connectionFactory = new CachingConnectionFactory(rabbitConnectionFactory); if (StringUtils.hasText(this.connectionName)) { this.connectionFactory.setConnectionNameStrategy(cf -> this.connectionName); } if (this.addresses != null) { this.connectionFactory.setAddresses(this.addresses); } ConnectionFactoryConfigurationUtils.updateClientConnectionProperties(this.connectionFactory, this.clientConnectionProperties); updateConnectionClientProperties(this.connectionFactory.getRabbitConnectionFactory().getClientProperties()); setUpExchangeDeclaration(); this.senderPool = Executors.newCachedThreadPool(); for (int i = 0; i < this.senderPoolSize; i++) { this.senderPool.submit(new EventSender()); } } }