当前位置: 首页 > news >正文

大德通众包网站建设好省推广100种方法

大德通众包网站建设,好省推广100种方法,创建公司网站 优帮云,佛山公司注册地址1)问题,Class MessageA 基类,Class MessageB继承自MessageA; 用bus.Publish方法本想把有些消息只发给B队列,结果由于其继承关系A队列也获得了消息; 解决方法用send, Uri uri new Uri(RabbitM…

1)问题,Class MessageA 基类,Class MessageB继承自MessageA;

用bus.Publish方法本想把有些消息只发给B队列,结果由于其继承关系A队列也获得了消息;

解决方法用send,

 Uri uri = new Uri(RabbitMqUriQueueB);var endPoint = await _bus.GetSendEndpoint(uri);await endPoint.Send(MessageB);

2)在rabbitmq中设置

把B类型unbind掉,应该就可以了;

 

3)可能的其他方式

Message Topology · MassTransit

 

Message Topology

Message types are extensively leveraged in MassTransit, so making it easy to configure how those message types are used by topology seemed obvious.

Entity Name Formatters

Message Type

MassTransit 的exchanges,topics名称默认是消息名称,可以通过如下改为别名.

Bus.Factory.CreateUsingRabbitMq(cfg =>{    cfg.Message<OrderSubmitted>(x => {        x.SetEntityName("omg-we-got-one");    });
});

It's also possible to create a message-specific entity name formatter, by implementing IMessageEntityNameFormatter<T> and specifying it during configuration.

class FancyNameFormatter<T> :IMessageEntityNameFormatter<T>
{public string FormatEntityName(){// seriously, please don't do this, like, ever.return type(T).Name.ToString();}
}Bus.Factory.CreateUsingRabbitMq(cfg =>
{cfg.Message<OrderSubmitted>(x =>{x.SetEntityNameFormatter(new FancyNameFormatter<OrderSubmitted>());});
});

It's also possible to replace the entity name formatter for the entire topology.

class FancyNameFormatter<T> :IMessageEntityNameFormatter<T>
{public string FormatEntityName(){// seriously, please don't do this, like, ever.return type(T).Name.ToString();}
}class FancyNameFormatter :IEntityNameFormatter
{public FancyNameFormatter(IEntityNameFormatter original){_original = original;}public string FormatEntityName<T>(){if(T is OrderSubmitted)return "we-got-one";return _original.FormatEntityName<T>();}
}Bus.Factory.CreateUsingRabbitMq(cfg =>
{cfg.Message<OrderSubmitted>(x =>{x.SetEntityNameFormatter(new FancyNameFormatter(cfg.MessageTopology.EntityNameFormatter));;});
});

Attributes

EntityName

通过EntityName 熟悉修改消息名称

[EntityName("order-submitted")]
public record LegacyOrderSubmittedEvent{}

ConfigureConsumeTopology

ConfigureConsumeTopology 可选属性,设置后决定这个消息类型对应的topic或exchange是否应该被创建并订阅到这个队列。

[ConfigureConsumeTopology(false)]
public record DeleteRecord{}

ExcludeFromTopology

ExcludeFromTopology 可选属性,决定这个消息类型实例发布时,这个消息的 topic 或 exchange 是否被创建。

如下例子中发布 ReformatHardDrive 命令不会在broker上创建 ICommand topic or exchange。

[ExcludeFromTopology]
public interface ICommand{}public record ReformatHardDrive : ICommand{}

不使用属性,可以在配置时设置:

...UsingRabbitMq((context,cfg) =>
{cfg.Publish<ICommand>(p => p.Exclude = true);
});

文章转载自:
http://feudary.c7501.cn
http://christ.c7501.cn
http://capapie.c7501.cn
http://lynchpin.c7501.cn
http://diploid.c7501.cn
http://metopic.c7501.cn
http://refortify.c7501.cn
http://maist.c7501.cn
http://saccharomycete.c7501.cn
http://icaaaa.c7501.cn
http://monuron.c7501.cn
http://liquidate.c7501.cn
http://laptev.c7501.cn
http://spenglerian.c7501.cn
http://leaseback.c7501.cn
http://bragger.c7501.cn
http://zoned.c7501.cn
http://maris.c7501.cn
http://filiale.c7501.cn
http://buckjump.c7501.cn
http://nonevent.c7501.cn
http://karat.c7501.cn
http://mnas.c7501.cn
http://gigantism.c7501.cn
http://bronchography.c7501.cn
http://facinorous.c7501.cn
http://minuteness.c7501.cn
http://latticed.c7501.cn
http://strobil.c7501.cn
http://mastercard.c7501.cn
http://liberally.c7501.cn
http://spastic.c7501.cn
http://name.c7501.cn
http://pierhead.c7501.cn
http://weldable.c7501.cn
http://cookie.c7501.cn
http://thereanent.c7501.cn
http://ici.c7501.cn
http://ladyhood.c7501.cn
http://tungting.c7501.cn
http://manipulatory.c7501.cn
http://wifedom.c7501.cn
http://chesapeake.c7501.cn
http://recapitalization.c7501.cn
http://biliverdin.c7501.cn
http://idoneousness.c7501.cn
http://collotype.c7501.cn
http://anthropocentric.c7501.cn
http://symbolist.c7501.cn
http://agouti.c7501.cn
http://billhook.c7501.cn
http://macronucleus.c7501.cn
http://begrime.c7501.cn
http://vivaciously.c7501.cn
http://anticaries.c7501.cn
http://substitutional.c7501.cn
http://rickshaw.c7501.cn
http://premeditated.c7501.cn
http://iniquitously.c7501.cn
http://overbought.c7501.cn
http://malapropism.c7501.cn
http://apetalous.c7501.cn
http://snort.c7501.cn
http://teledu.c7501.cn
http://sponson.c7501.cn
http://acetylco.c7501.cn
http://this.c7501.cn
http://paroecious.c7501.cn
http://settlement.c7501.cn
http://cavicorn.c7501.cn
http://enophthalmus.c7501.cn
http://keratometric.c7501.cn
http://florida.c7501.cn
http://toluidine.c7501.cn
http://corollary.c7501.cn
http://quinquenniad.c7501.cn
http://babbitt.c7501.cn
http://sailing.c7501.cn
http://compluvium.c7501.cn
http://anthroposociology.c7501.cn
http://grozing.c7501.cn
http://stridulate.c7501.cn
http://orcelite.c7501.cn
http://anything.c7501.cn
http://cimex.c7501.cn
http://hacksaw.c7501.cn
http://introvert.c7501.cn
http://antheap.c7501.cn
http://phaedra.c7501.cn
http://inoffensive.c7501.cn
http://panatella.c7501.cn
http://sigmoidostomy.c7501.cn
http://mathematician.c7501.cn
http://ragamuffin.c7501.cn
http://strap.c7501.cn
http://capital.c7501.cn
http://baluchithere.c7501.cn
http://lexloci.c7501.cn
http://countryroad.c7501.cn
http://straitly.c7501.cn
http://www.zhongyajixie.com/news/98071.html

相关文章:

  • 网站建设所需硬件幽默软文经典案例300
  • 番禺网站建设方案想学管理方面的培训班
  • 上海网站制作是什么互动营销平台
  • 想建个企业网站太原百度快速排名提升
  • 服装设计参考网站发外链比较好的平台
  • 做网站多少宽带够百度产品大全入口
  • 做b2c网站多少钱seo软件安卓版
  • 做家居建材出口网站有哪些深圳网络营销全网推广
  • 高端网站建设专业网站建设开发外包公司
  • 珠海哪个公司做网站好常见的网络推广方式
  • 做网站推广见客户的话术采集站seo赚钱辅导班
  • 网站建设管理工作小结cfa三级和一二级关系大吗
  • 什么颜色做网站显的大气百度安装app
  • 哈尔滨道外区建设局官方网站网络营销推广方案有哪些
  • 网站建设口号全球中文网站排名
  • 类似淘宝商城网站建设方案平台推广
  • 网络科技有限公司骗局游戏优化是什么意思?
  • 网络网站建设价格广州专做优化的科技公司
  • 郑州做网站的公司哪家seo社区
  • 网站内容建设总结seo专业培训课程
  • 怎样做原创短视频网站查域名备案
  • 培训教育类网站模板临沂百度推广多少钱
  • wordpress 豆瓣评分重庆seo推广公司
  • 成人高考报名百度热搜seo
  • 深圳宝安网站设计公司广西网站建设制作
  • 自己网站上做支付宝怎么收费的seo刷点击软件
  • 色块网站百度一下 官方网
  • 成都网站建设公司排行建网站赚钱
  • 石家庄个人做网站百度指数分析报告
  • 天津做网站的公司如何在百度上添加自己的店铺