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

node.js做网站好累/石家庄学院

node.js做网站好累,石家庄学院,撰写超越时空网上书城网站策划书,杭州电信网站备案因为项目原因,需要使用到rabbitmq的c客户端库。首先,参见上一篇windows下openssl编译,如果已经使用cmake编译过了,则先delete cache(File-Delete Cache),否则原来的cmake缓存都在了,…

因为项目原因,需要使用到rabbitmq的c客户端库。首先,参见上一篇windows下openssl编译,如果已经使用cmake编译过了,则先delete cache(File-Delete Cache),否则原来的cmake缓存都在了,将仍然会出现原来的错误。

依次点击configire、generate,可以生成vs sln。如下:

最后使用VS即可生成rabbitmq.4.dll,如下:

测试自带的例子:

D:\RabbitMQ Server\rabbitmq_server-3.6.5\sbin>cd /d D:\rabbitmq-c-0.8.0-build\examples\DebugD:\rabbitmq-c-0.8.0-build\examples\Debug>amqp_listen localhost 5672 amq.direct test
Delivery 1, exchange amq.direct routingkey test
Content-type: text/plain
----
00000000: 68 65 6C 6C 6F 20 77 6F : 72 6C 64                 hello world
0000000B:
Delivery 2, exchange amq.direct routingkey test
Content-type: text/plain
----
00000000: 68 65 6C 6C 6F 20 77 6F : 72 6C 64                 hello world
0000000B:
Delivery 3, exchange amq.direct routingkey test
Content-type: text/plain
----
00000000: 68 65 6C 6C 6F 20 77 6F : 72 6C 64                 hello world
0000000B:
Delivery 4, exchange amq.direct routingkey test

新开一个窗口,执行如下:

D:\RabbitMQ Server\rabbitmq_server-3.6.5\sbin>cd /d D:\rabbitmq-c-0.8.0-build\examples\DebugD:\rabbitmq-c-0.8.0-build\examples\Debug>amqp_sendstring localhost 5672 amq.direct test "hello world"D:\rabbitmq-c-0.8.0-build\examples\Debug>amqp_sendstring localhost 5672 amq.direct test "hello world"D:\rabbitmq-c-0.8.0-build\examples\Debug>amqp_sendstring localhost 5672 amq.direct test "hello world"D:\rabbitmq-c-0.8.0-build\examples\Debug>amqp_sendstring localhost 5672 amq.direct test "hello world"D:\rabbitmq-c-0.8.0-build\examples\Debug>amqp_sendstring localhost 5672 amq.direct test "hello world"D:\rabbitmq-c-0.8.0-build\examples\Debug>amqp_sendstring localhost 5672 amq.direct test "hello world"D:\rabbitmq-c-0.8.0-build\examples\Debug>amqp_sendstring localhost 5672 amq.direct test "hello world"

需要注意的是,librabbitmq的channel不是线程安全的,因此需要应用自行保证线程安全性,如下所述:

Threading

You cannot share a socket, an amqp_connection_state_t, or a channel between threads using librabbitmq. The librabbitmqlibrary is built with event-driven, single-threaded applications in mind, and does not yet cater to any of the requirements of pthreaded applications.

Your applications instead should open an AMQP connection (and an associated socket, of course) per thread. If your program needs to access an AMQP connection or any of its channels from more than one thread, it is entirely responsible for designing and implementing an appropriate locking scheme. It will generally be much simpler to have a connection exclusive to each thread that needs AMQP service.

官方主页https://github.com/alanxz/rabbitmq-c

 doc api http://alanxz.github.io/rabbitmq-c/docs/0.8.0/classes.html

剩下的就是慢慢啃主要的api了。

转载于:https://www.cnblogs.com/zhjh256/p/6416353.html

http://www.jmfq.cn/news/4837033.html

相关文章:

  • 沈丘做网站去哪里/网站开发流程
  • 东莞营销型网站建设/时事新闻最新消息
  • 温州网站制作方案/免费发布信息网站大全
  • 网站做app服务端/怎么注册域名网址
  • 哪个网站可以查到竣工资料怎么做/餐饮培训
  • 扁平化设计 科技感网站素材/全球网络营销公司排名
  • 网站建设开发全包/宁波seo在线优化方案公司
  • 做视频直播的网站有哪些/我对网络营销的理解
  • 四川省人民政府官方网站/百度秒收录技术最新
  • 民治做网站/百度下载安装官方下载
  • 台湾wordpress/seo门户 site
  • 网站建设中是什么意思/爱站网长尾关键词挖掘工具下载
  • 网站制作建设公司/app地推接单平台有哪些
  • 那些网站主做玄幻小说/今天最新新闻
  • 企业网络推广做网站推广公司/搜索引擎推广的常见形式有
  • 网站开发详细报价单/百度竞价推广思路
  • 做装饰网站公司/seo网络推广案例
  • 做微网站用什么框架/制作网站需要什么技术
  • 德州网站建设公司/百度推广登录手机版
  • 做微信网站/广告营销推广
  • 广告公司可以做网站吗/网络营销的特点不包括
  • 推广网站企业/百度关键词优化系统
  • 做盗版音乐网站/seo排名的方法
  • java php 网站建设/关键词推广优化排名如何
  • 怎么做律所的官方网站/国内比百度好的搜索引擎
  • 做网站前的准备什么软件/外贸网站推广平台有哪些
  • vi设计 站酷/西安网站搭建
  • 时时彩网站建设/湖南优化推广
  • 网站 免费空间/免费推广网站2023
  • 重庆网站优化建设/seo推广优化平台