Comments (11)
请问有解决方案么
from mop.
@iTigeroar @xiaoxiongmao-liu Will build an image with MQTT protocol handler and upgrade the helm chart to allow enable MoP.
from mop.
@timmyyuan Could you please help with the MoP release part? Make sure we have MoP in the docker image such as KoP.
from mop.
any update?
from mop.
请问有解决方案么
@xiaoxiongmao-liu You can use init-container to download mop file of nar to protocols directory and juse use it.
from mop.
请问有解决方案么
@xiaoxiongmao-liu You can use init-container to download mop file of nar to protocols directory and juse use it.
@liangyuanpeng I have solved it
from mop.
请问有解决方案么
@xiaoxiongmao-liu You can use init-container to download mop file of nar to protocols directory and juse use it.
@liangyuanpeng I have solved it
Great, Could you share your case? I think it will help the other people.
from mop.
请问有解决方案么
@xiaoxiongmao-liu You can use init-container to download mop file of nar to protocols directory and juse use it.
@liangyuanpeng I have solved it
Great, Could you share your case? I think it will help the other people.
准备mop的.nar文件
- 第一种方式:直接下载官方已打好的nar包
- 第二种方式:从官方拷贝源码,自己在本地打包,打包过程在官方文档中说明的比较清楚
准备Dockerfile
FROM apachepulsar/pulsar-all:2.7.2
COPY *.nar ./protocols/
RUN echo 'messagingProtocols=mqtt \n\
mqttProxyEnable=true \n\
mqttProxyPort=5682' >> ./conf/broker.conf
注意:
- 基础镜像我在这里选择的是pulsar官方提供的2.7.2版本,后续helm版本要保持一致,若不能保证完全一致,至少要保证helm的版本是2.7.*
- 写入 broker.conf配置文件中的配置我这里少写了一个
mqttListeners=mqtt://127.0.0.1:1883
这里如果下载了源码进行打包的同学可以在 MQTTProtocolHandler类中下面位置新增被圈中的代码
如果没有下载源码,那么要在Dockerfile里写入broker.conf配置时新增,地址写pulsar在k8s中对内的服务名:{service_name}.{namespace}.svc.cluster.local
,类似于上述给定的形式。若不知道,可以先尝试用pulsar的官方helm部署一次即可得知,后面还得加上端口号1883
- Dockerfile要与nar文件处于同一目录下,如/etc/mop
生成镜像
在/etc/mop目录下执行docker build -t apachepulsar/pulsar-all:2.7.2-mop .
生成本地镜像
##准备helm
pulsar-helm官方地址
- 安装好helm,网上教程很多,这里就不在赘述
- 从pulsar-helm官方网址中下载pulsar-helm到本地
- 修改helm中的values.yaml文件中pulsar镜像配置,路径:
../pulsar-helm-chart/charts/pulsar/values.yaml
找到images配置,如下图
,apachepulsar/pulsar-all的tag都改成2.7.2-mop - 在pulsar-helm-chart目录下执行以下命令
helm install pulsar charts/pulsar \
--timeout 10m \
--set initialize=true \
--set volumes.persistence=false \
--set namespaceCreate=true \
--set namespace=pulsar \
--set affinity.anti_affinity=false
等待部署完成即可,部署所在k8s的namespace为pulsar。
我的环境相关
Mac,docker desk,docker desk自带的k8s
更多说明
其他可参考上述描述自行摸索,另外验证是否部署成功,可在k8s的dashboard进行观察,验证mop是否生效,可以部署一个pod用mqtt协议去连接pulsar,地址即是:{service_name}.{namespace}.svc.cluster.local:5682
。若想在k8s外部验证,需要k8s对外开放此服务的5682端口,mqtt地址改成外部访问k8s此服务的域名或者地址,具体方法请自行摸索
from mop.
Here is an image that contains the MoP plugin under the ./protocols
directly. And the subsequent release will also contain the MoP plugin.
from mop.
感谢你的分享,基本上就是自行打包镜像将nar文件放到镜像里面,但这样不能很好的跟着上游更新。
在我看来更友好的方式应该是用一个init-container去下载对应的nar文件到pulsar broker需要使用的protocols目录下. 或者是pulsar官方镜像有一个版本本身已经带有nar文件( 协议插件不是必须的,因此是另一个带有nar文件的版本 而不是pulsar原先的版本).
例如上述提供的streamnative/sn-pulsar
, 这就可以作为一个带有nar文件的镜像版本使用
from mop.
I think streamnative/charts worth paying attention to.
Especially streamnative/charts#295 (Enable MQTT-on-Pulsar on Broker ).
from mop.
Related Issues (20)
- Can not support shared subscription
- Connection is null HOT 1
- Flaky-test: SimpleIntegrationTest.testConsumerDisconnectNotMissingMessage
- Is this still maintained? HOT 7
- IdleStateHandler may be changed when proxy to broker using the same connection HOT 1
- if the connection from proxy to broker is down, it will cause many client connections to be closed HOT 4
- Qos2 Support HOT 2
- memory leak HOT 1
- Topic Grant-Permission Operation caused MQTT Clients Disconnected
- The mqtt plug-in shows that the loading is successful, but ports 5682 and 1833 still fail to listen. HOT 2
- [WIP] MIP-? Introduce new implementation for MoP
- Please redo the lookup. Request is denied: namespace=public/default HOT 2
- OPENSSL_internal:WRONG_VERSION_NUMBER excpetion when using MOP TLS Proxy HOT 1
- MQTT retain publishes do not make it to Pulsar HOT 3
- Readme.md states "only MQTT 3.1.1 supported" but code base seems to indicate MQTT 5 is also supported HOT 1
- LWT does not reach Pulsar topic, short cuts QoSPublishHandlers so Qos nor Retain function properly HOT 2
- Resubscribing on previously unsubscribed topic closes connection HOT 1
- LWT fires on graceful disconnect but not on connection loss HOT 1
- MQTT QOS support level? HOT 1
- Unsubscribed topic, repeatedly kicked out using client connection only. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mop.