Beispiel #1
0
 /// <summary>
 /// Ensure a destination exists, and bind it to the exchanges for the given type
 /// </summary>
 public void CreateDestination <T>([NotNull] string destinationName, [NotNull] Expires messageExpiry)
 {
     CreateDestination(typeof(T), destinationName, messageExpiry);
 }
Beispiel #2
0
        /// <summary>
        /// Ensure a destination exists, and bind it to the exchanges for the given type
        /// </summary>
        public void CreateDestination([NotNull] Type sourceType, [NotNull] string destinationName, [NotNull] Expires messageExpiry)
        {
            RouteSource(sourceType);

            if (messageExpiry.Milliseconds > 0)
            {
                messageRouter.AddLimitedDestination(destinationName, messageExpiry);
            }
            else
            {
                messageRouter.AddDestination(destinationName);
            }

            messageRouter.Link(sourceType.FullName, destinationName);
        }