Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug:emqx_messages table payload type wrong #2421

Open
gongna-au opened this issue Apr 3, 2024 · 0 comments
Open

bug:emqx_messages table payload type wrong #2421

gongna-au opened this issue Apr 3, 2024 · 0 comments

Comments

@gongna-au
Copy link

https://www.emqx.io/docs/zh/latest/data-integration/data-bridge-mysql.html

CREATE TABLE emqx_messages (
id INT AUTO_INCREMENT PRIMARY KEY,
clientid VARCHAR(255),
topic VARCHAR(255),
payload BLOB,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

如果想通过mqttx pub -i emqx_c -t t/1 -m '{ "msg": "hello MySQL" }' 发送消息并且存储到emqx_messages 这里的payload 应该为VARCHAR(255)才能得到

mysql> select * from emqx_messages;
+----+----------+-------+--------------------------+---------------------+
| id | clientid | topic | payload                  | created_at          |
+----+----------+-------+--------------------------+---------------------+
|  1 | emqx_c   | t/1   | { "msg": "hello MySQL" } | 2022-12-09 08:44:07 |
+----+----------+-------+--------------------------+---------------------+
1 row in set (0.01 sec)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant