首页 文章 精选 留言 我的

精选列表

搜索[消息对话],共10000篇文章
优秀的个人博客,低调大师

mac 安装消息中间件---ActiveMQ

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u010046908/article/details/54728375 一般在mac上安装软件大家都是比较喜欢用brew来安装,今天就用brew来安装ActiveMQ。 1.使用brew来安装 ActiveMQ brew install activemq 看到如下的结果时候,可以很庆幸的告诉你,你已经成功安装了activemq。 localhost:~ lidong$ brew install activemq Updating Homebrew... ==> Auto-updated Homebrew! Updated 1 tap (homebrew/core). ==> New Formulae bit gobby molecule statik carrot2 gsmartcontrol opencoarrays tarsnap-gui cnats gtk-chtheme orc-tools terminator easy-tag imagemagick@6 source-to-image todoman geeqie klavaro speexdsp watchexec gifcap mingw-w64-binutils sqlparse ==> Updated Formulae abcde gradle opus adns grafana orientdb afl-fuzz groonga osc amazon-ecs-cli grsync osquery ammonite-repl gsoap packer ansible gtk+ packetbeat ansible-cmdb gtk+3 pandoc ant h2o parallel antigen hana pazpar2 apktool haproxy pbzip2 app-engine-go-64 harfbuzz pcsc-lite arangodb heroku pdf2htmlex aria2 hivemind pdfcrack armor htmlcleaner pdftoedn arping httrack pdns asio hunspell pev assh hyperscan pgformatter aubio icarus-verilog pgrouting autotrace icoutils pius aws-elasticbeanstalk ievms pkcs11-helper aws-sdk-cpp imagemagick plantuml awscli influxdb pngcrush b2-tools innotop pod2man beansdb intercal poppler berkeley-db ios-webkit-debug-proxy postgrest bfg iperf3 pre-commit bib-tool irssi prips bibutils iso-codes prometheus bind jack pstoedit bitlbee javarepl pulseaudio bitrise jdnssec-tools purescript blockhash jenkins pushpin bogofilter jid pwntools buku jigdo pyenv cabal-install joe pyqt5 caddy jruby qbs cadubi kapacitor qcachegrind caf kawa qemu carina khal qjackctl cattle kibana qscintilla2 cdk kobalt quantlib certbot kotlin rabbitmq clasp kubernetes-cli rancher-cli cloc kubernetes-helm rancher-compose cmake languagetool rancid coffeescript lastpass-cli ranger collectd lean-cli ripgrep commandbox leptonica rocksdb conan lft rpm consul-template libass rswift coturn libcec rtags cromwell libcouchbase rtv crystal-lang libdap ruby-build curlpp libev rust dar libfabric sbcl darcs libgcrypt sdb darkice libgit2 serd datetime-fortran libgit2-glib sfk datomic libgosu shadowsocks-libev dbhash libgphoto2 shmcat dbt libgtop sip dbxml liblas snap7 dcmtk libmikmod snort deis libmill soci deisctl libming sops dependency-check libmwaw sord diff-pdf libosmium sourcekitten diffoscope libphonenumber speedtest_cli dirt libpng sphinx-doc dmd libproxy sqldiff dnscrypt-proxy libsass sqlite docker libslax sqlite-analyzer docker-compose libspectre sshguard docker-machine libsvm sstp-client docker-machine-nfs libtasn1 stern docker-machine-parallels libtiff stoken docker-swarm libupnp stormpath-cli dockward libusb svtplay-dl doitlive libvirt swaks dpkg libvpx swift dub libxc swiftformat duplicity libxml2 swiftgen dwarfutils lighttpd swiftlint ecl link-grammar swig eiffelstudio linkerd syncthing ejabberd liquigraph synfig eject lmdb syntaxerl elasticsearch logentries tbox elasticsearch@2.4 logstash tcpkali elixir logtalk telegraf elixirscript lrdf terraform emscripten lsyncd terragrunt etcd ltc-tools thefuck euca2ools lz4 thrift extract_url macvim tile38 fabio makeself tin fdk-aac mariadb tintin fftw mcabber tippecanoe filebeat mediaconch tomcat flatbuffers memcached transcrypt flow memcacheq tty-clock fluent-bit mercurial ttyd fontforge metaproxy tvnamer fonttools metricbeat twarc fossil micropython typescript fping mikutter u-boot-tools fq minizip udunits freeswitch mktorrent unittest-cpp freetds mkvtoolnix unrar fwup moc unshield fzf mongo-c-driver vapoursynth gammu mongodb vdirsyncer gcal mongoose vice gdb mono vim geckodriver mpd wavpack geoipupdate mpv webalizer ghc msgpack weechat ghostscript mypy whatmp3 ginac neofetch wireguard-tools git-cola nexus xapian git-lfs nghttp2 xmlrpc-c git-subrepo nim xonsh git-test no-more-secrets xqilla git-tracker node xrootd giter8 node-build xxhash gitlab-ci-multi-runner node@0.12 xz gitup node@4 yadm gitversion node@6 yank gmime nodeenv yarn gnu-cobol notmuch yash gnu-sed nss yaws gnupg-pkcs11-scd nvc yaz gnupg2 nvi yle-dl gnuradio open-cobol you-get gnutls open-jtalk youtube-dl go open-mesh zabbix godep open-ocd zbar gofabric8 openconnect zeromq google-java-format opencore-amr zimg gosu openshift-cli zplug ==> Renamed Formulae eigen32 -> eigen@3.2 scala210 -> scala@2.10 scala211 -> scala@2.11 ==> Deleted Formulae cpp-netlib dmtx-utils dynamodb-local gcc@6 qtplay ==> Using the sandbox ==> Downloading https://www.apache.org/dyn/closer.cgi?path=/activemq/5.14.3/apac ==> Best Mirror http://mirrors.cnnic.cn/apache/activemq/5.14.3/apache-activemq-5 ######################################################################## 100.0% ==> Caveats To have launchd start activemq now and restart at login: brew services start activemq Or, if you don't want/need a background service you can just run: activemq start ==> Summary �� /usr/local/Cellar/activemq/5.14.3: 555 files, 59.7M, built in 1 minute 39 seconds localhost:~ lidong$ 2.使用activemq –version来查看安装的版本 localhost:~ lidong$ activemq --version INFO: Loading '/usr/local/Cellar/activemq/5.14.3/libexec//bin/env' INFO: Using java '/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/bin/java' Java Runtime: Oracle Corporation 1.8.0_92 /Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/jre Heap sizes: current=62976k free=61648k max=932352k JVM args: -Xms64M -Xmx1G -Djava.util.logging.config.file=logging.properties -Djava.security.auth.login.config=/usr/local/Cellar/activemq/5.14.3/libexec//conf/login.config -Dactivemq.classpath=/usr/local/Cellar/activemq/5.14.3/libexec//conf:/usr/local/Cellar/activemq/5.14.3/libexec//../lib/: -Dactivemq.home=/usr/local/Cellar/activemq/5.14.3/libexec/ -Dactivemq.base=/usr/local/Cellar/activemq/5.14.3/libexec/ -Dactivemq.conf=/usr/local/Cellar/activemq/5.14.3/libexec//conf -Dactivemq.data=/usr/local/Cellar/activemq/5.14.3/libexec//data Extensions classpath: [/usr/local/Cellar/activemq/5.14.3/libexec/lib,/usr/local/Cellar/activemq/5.14.3/libexec/lib/camel,/usr/local/Cellar/activemq/5.14.3/libexec/lib/optional,/usr/local/Cellar/activemq/5.14.3/libexec/lib/web,/usr/local/Cellar/activemq/5.14.3/libexec/lib/extra] ACTIVEMQ_HOME: /usr/local/Cellar/activemq/5.14.3/libexec ACTIVEMQ_BASE: /usr/local/Cellar/activemq/5.14.3/libexec ACTIVEMQ_CONF: /usr/local/Cellar/activemq/5.14.3/libexec/conf ACTIVEMQ_DATA: /usr/local/Cellar/activemq/5.14.3/libexec/data ActiveMQ 5.14.3 For help or more information please see: http://activemq.apache.org 3.activemq常用的命令 Tasks: browse - Display selected messages in a specified destination. bstat - Performs a predefined query that displays useful statistics regarding the specified broker consumer - Receives messages from the broker create - Creates a runnable broker instance in the specified path. decrypt - Decrypts given text dstat - Performs a predefined query that displays useful tabular statistics regarding the specified destination type encrypt - Encrypts given text export - Exports a stopped brokers data files to an archive file list - Lists all available brokers in the specified JMX context producer - Sends messages to the broker purge - Delete selected destination's messages that matches the message selector query - Display selected broker component's attributes and statistics. start - Creates and starts a broker using a configuration file, or a broker URI. stop - Stops a running broker specified by the broker name. Task Options (Options specific to each task): --extdir <dir> - Add the jar files in the directory to the classpath. --version - Display the version information. -h,-?,--help - Display this help information. To display task specific help, use Main [task] -h,-?,--help 4.启动activeMQ服务 activemq start 看到如下信息,就表示已经安装成功 localhost:~ lidong$ activemq start INFO: Loading '/usr/local/Cellar/activemq/5.14.3/libexec//bin/env' INFO: Using java '/Library/Java/JavaVirtualMachines/jdk1.8.0_92.jdk/Contents/Home/bin/java' INFO: Starting - inspect logfiles specified in logging.properties and log4j.properties to get details INFO: pidfile created : '/usr/local/Cellar/ActiveMQ/5.14.3/libexec//data/activemq.pid' (pid '2402') 然后就可以访问管理web console。在浏览器中输入url: http://localhost:8161/ 点击 Manager ActiveMQ boker 输入用户名:admin 密码admin 看到这个页面,就可以到ActiveMQ 启动成功了。

优秀的个人博客,低调大师

iOS - OC RunLoop 运行循环/消息循环

1、RunLoop 1)运行循环: 运行循环在 iOS 开发中几乎不用,但是概念的理解却非常重要。 同一个方法中的代码一般都在同一个运行循环中执行,运行循环监听 UI 界面的修改事件,待本次运行循环结束时,统一将界面的修改渲染出来。 点击事件触发结束后立即结束本次运行循环。 作用: 保证程序不退出。 负责监听所有事件,例如:手势触摸,时钟触发,网络加载数据完成等。 特性: 没有事件时,会休眠(省电),一旦监听到事件,会立即响应。 每一个线程都有一个 runloop,但是只有主线程的 runloop 会默认启动。子线程的运行循环默认是不启动的。 2)子线程运行循环: 子线程的运行循环默认是不启动的。 启动运行循环后,如果不停止运行循环,不会执行后续的任何代码,会形成一个死循环。 一旦停止了运行循环,后续代码能够执行,执行完毕后,线程被自动销毁。 3)响应者链条事件监听过程: 2、运行循环的使用 2.1 时钟调度 /* - (void)addTimer:(NSTimer *)timer forMode:(NSString *)mode; NSDefaultRunLoopMode: 时钟,网络。 发生用户交互的时候,时钟会被暂停 NSRunLoopCommonModes: 用户交互,响应级别高。 发生用户交互的时候,时钟仍然会触发,如果时钟触发方法非常耗时, 使用此方式时用户操作会造成非常严重的卡顿。 */ 以 NSRunLoopCommonModes 方式创建 // 调度时钟 self.timer = [NSTimer timerWithTimeInterval:1.0 target:self selector:@selector(updateTimer) userInfo:nil repeats:YES]; // 将时钟以 NSRunLoopCommonModes 模式添加到运行循环 [[NSRunLoop currentRunLoop] addTimer:self.timer forMode:NSRunLoopCommonModes]; 以 NSDefaultRunLoopMode 方式创建 // 调度时钟 /* 默认将时钟以 NSDefaultRunLoopMode 模式添加到运行循环 */ self.timer = [NSTimer scheduledTimerWithTimeInterval:1.0 target:self selector:@selector(updateTimer) userInfo:nil repeats:YES]; 子线程运行循环 dispatch_async(dispatch_get_global_queue(0, 0), ^{ // 在子线程开启时钟,由于子线程的运行循环没有启动,所以没法监听时钟事件 self.timer = [NSTimer timerWithTimeInterval:1.0 target:self selector:@selector(updateTimer) userInfo:nil repeats:YES]; [[NSRunLoop currentRunLoop] addTimer:self.timer forMode:NSDefaultRunLoopMode]; // 启动子线程的运行循环,这句代码就是一个死循环!如果不停止运行循环,不会执行后续的任何代码 CFRunLoopRun(); // 停止子线程运行循环之前,不会执行添加到此处的任何代码 }); // 运行循环执行操作方法 - (void)updateTimer { static int num = 0; NSLog(@"%d %@", num++, [NSThread currentThread]); // 满足条件后,停止当前的运行循环 if (num == 8) { // 一旦停止了运行循环,后续代码能够执行,执行完毕后,线程被自动销毁 CFRunLoopStop(CFRunLoopGetCurrent()); } }

资源下载

更多资源
Mario

Mario

马里奥是站在游戏界顶峰的超人气多面角色。马里奥靠吃蘑菇成长,特征是大鼻子、头戴帽子、身穿背带裤,还留着胡子。与他的双胞胎兄弟路易基一起,长年担任任天堂的招牌角色。

Nacos

Nacos

Nacos /nɑ:kəʊs/ 是 Dynamic Naming and Configuration Service 的首字母简称,一个易于构建 AI Agent 应用的动态服务发现、配置管理和AI智能体管理平台。Nacos 致力于帮助您发现、配置和管理微服务及AI智能体应用。Nacos 提供了一组简单易用的特性集,帮助您快速实现动态服务发现、服务配置、服务元数据、流量管理。Nacos 帮助您更敏捷和容易地构建、交付和管理微服务平台。

Spring

Spring

Spring框架(Spring Framework)是由Rod Johnson于2002年提出的开源Java企业级应用框架,旨在通过使用JavaBean替代传统EJB实现方式降低企业级编程开发的复杂性。该框架基于简单性、可测试性和松耦合性设计理念,提供核心容器、应用上下文、数据访问集成等模块,支持整合Hibernate、Struts等第三方框架,其适用范围不仅限于服务器端开发,绝大多数Java应用均可从中受益。

Sublime Text

Sublime Text

Sublime Text具有漂亮的用户界面和强大的功能,例如代码缩略图,Python的插件,代码段等。还可自定义键绑定,菜单和工具栏。Sublime Text 的主要功能包括:拼写检查,书签,完整的 Python API , Goto 功能,即时项目切换,多选择,多窗口等等。Sublime Text 是一个跨平台的编辑器,同时支持Windows、Linux、Mac OS X等操作系统。

用户登录
用户注册