Commit 4ffee379 by dingsongjie

晚上 自定义 事件名称

parent b4bdc9d8
......@@ -24,6 +24,12 @@ namespace Pole.Core.Serialization
{
foreach (var type in assembly.GetTypes().Where(m => baseEventType.IsAssignableFrom(m)&&!m.IsAbstract))
{
var eventCode = type.FullName;
var eventAttribute = type.GetCustomAttributes(typeof(EventAttribute),false).FirstOrDefault();
if (eventAttribute is EventAttribute attribute )
{
eventCode = attribute.EventName;
}
typeDict.TryAdd(type, type.FullName);
if (!codeDict.TryAdd(type.FullName, type))
......
......@@ -68,7 +68,7 @@ namespace Pole.EventBus.RabbitMQ
observerUnit.GetBatchEventHandler())
{
EventBus = this,
QueueInfo = new QueueInfo { RoutingKey = RoutePrefix, Queue = $"{RoutePrefix}_{queueNameSuffix}" },
QueueInfo = new QueueInfo { RoutingKey = string.Empty, Queue = $"{RoutePrefix}_{queueNameSuffix}" },
Config = ConsumerConfig
};
Consumers.Add(consumer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment