Enable EMQX

Weplanx adopts EMQX for integration to realize authorization management for real-time messaging.

Weplanx adopts EMQX for integration to realize authorization management for real-time messaging.

The open source version of EMQX Broker is used in the project.

Of course, the stable and powerful EMQX Enterprise is recommended for enterprise level.

Deploy

After installing EMQX Operator, deploy Broker, refer to the documentation.

apiVersion: apps.emqx.io/v2beta1
kind: EMQX
metadata:
  namespace: emqx
  name: broker
spec:
  image: emqx:5.1
  updateStrategy:
    evacuationStrategy:
      connEvictRate: 1000
      sessEvictRate: 1000
      waitTakeover: 10
    initialDelaySeconds: 10
    type: Recreate
  coreTemplate:
    spec:
      volumeClaimTemplates:
        storageClassName: local-path
        resources:
          requests:
            storage: 128Mi
        accessModes:
          - ReadWriteOnce

Create XAPI

After the application is launched, create an XAPI for use in the internal, View details.

Apply Service

Set HTTP Authentication and Authorization

The XAPI integrated EMQX API has these, next you need to access the EMQX Dashboard.

Authentication

  • Mechanism: Password-Based

  • Backend: HTTP Server

  • Method: POST

  • URL: http://server.default.svc:6000/emqx/auth

  • Body:

Authorization

  • Backend: HTTP Server

  • Method: POST

  • URL: http://server.default.svc:6000/emqx/acl

  • Body:

Data Bridges

The data bridge of XAPI is to collect logs for the open source version of Broker message sending.

If the enterprise version itself supports more functions, there is no need to use this method.

  • Type of Data Bridge: HTTP Server

  • Name(must): logset

  • Method: POST

  • URL: http://server.default.svc:6000/emqx/bridge

  • Body:

Last updated

Was this helpful?