/** * Set default time to live on all channels * @param timeToLive time to live in milliseconds */ public void setDefaultTimeToLive(long timeToLive) { defaultTimeToLive = timeToLive; if (channelFactory != null) channelFactory.setDefaultTimeToLive(timeToLive); for (MessagingChannel messagingChannel : messagingChannelsByType.values()) messagingChannel.setDefaultTimeToLive(timeToLive); if (remotingChannel != null) remotingChannel.setDefaultTimeToLive(timeToLive); }
channelFactory.setDefaultTimeToLive(defaultTimeToLive);