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

在家做网站怎么赚钱百度竞价ocpc

在家做网站怎么赚钱,百度竞价ocpc,新手怎么建立自己网站,哈尔滨餐饮网站建设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://www.fp688.cn/news/145933.html

相关文章:

  • 喀什住房和城乡建设局网站北京网络营销咨询公司
  • 镇江网站建设一般多少钱天津网络广告公司
  • 做美女网站挣钱如何建立网站平台的步骤
  • java直播网站怎么做网络工程师培训班要多少钱
  • 化工厂网站建设小姐关键词代发排名
  • mac做网站设计企业新闻营销
  • 闲置tp路由自己做网站现在怎么做网络推广
  • 网站建设经验大总结竞价托管公司
  • 做钓鱼网站判刑seo关键词优化服务
  • 四海网络网站建设幽默广告软文案例
  • 如何建设营销型网站搜索引擎优化包括
  • 网站怎么做搜索栏如何快速推广
  • 企业网站建设基本流程网站监测
  • 中山哪家建网站好360搜索推广
  • 洛阳网站制作哪家好深圳网站营销seo费用
  • 兰州官网排名推广企业新网站seo推广
  • 有了域名和空间怎么做网站内容什么是竞价
  • 网站与建设的字体间距小时seo
  • 网站建设专业客服接听术语优化关键词规则
  • 卖东西专业网站网上谷歌浏览器 免费下载
  • 怎么用织梦搭建网站大数据营销名词解释
  • 门户型网站建设方案网站关键词优化网站推广
  • 福建省建设厅考试网站网站查询系统
  • 苏州正规网站建设概况百度联盟是什么
  • 英文网站建设方案 ppt模板网站推广途径和推广要点
  • ps里怎么做网站腾讯广点通广告投放平台
  • 网络推广方法与技巧关键词怎么优化
  • 优化企业网站seo网站推广软件
  • 东营网络营销网站排名优化客服
  • 做网站发违规内容 网警抓不抓广州网络推广服务商