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

How to view the message.type attribute of a Topic? #5538

Closed
kutouziUk opened this issue Nov 18, 2022 · 18 comments
Closed

How to view the message.type attribute of a Topic? #5538

kutouziUk opened this issue Nov 18, 2022 · 18 comments
Assignees
Labels

Comments

@kutouziUk
Copy link

The FIFO attribute was specified when the Topic was created
image
The attribute is not displayed in the query result
sh bin/mqadmin topicRoute -b localhost:9016 -n localhost:9015 -t TTLK
image
and dashboard can't query this information either
image

@zhouxinyu
Copy link
Member

Good catch, the related tools are incomplete, feel free to assign this issue to yourself if you want.

@francisoliverlee francisoliverlee added the Good First Issue Good First Issue label Dec 9, 2022
@The-Gamer-01
Copy link

I would like to give it a try, can you assign this issue to me

@Oliverwqcwrw
Copy link
Member

I would like to give it a try, can you assign this issue to me

done

@Abhijeetmishr
Copy link
Contributor

@Oliverwqcwrw @zhouxinyu Can I pick this up ?

@Oliverwqcwrw
Copy link
Member

Hi @The-Gamer-01 , Since you haven't submitted PR for a long time, I'm going to assign this task to @Abhijeetmishr . You are also welcome to revise other issues, And welcome to the community @Abhijeetmishr

@Abhijeetmishr
Copy link
Contributor

Hi @The-Gamer-01 , Since you haven't submitted PR for a long time, I'm going to assign this task to @Abhijeetmishr . You are also welcome to revise other issues, And welcome to the community @Abhijeetmishr

@Oliverwqcwrw Thank you Oliver, Will definitely check other issues also which needs update.
Regards

@Abhijeetmishr
Copy link
Contributor

@zhouxinyu @kutouziUk @Oliverwqcwrw I think QueueData Class doesnot have this field (message.type)
image.
Correct me if I'm going in wrong direction.
Regards

@Oliverwqcwrw
Copy link
Member

@zhouxinyu @kutouziUk @Oliverwqcwrw I think QueueData Class doesnot have this field (message.type) image. Correct me if I'm going in wrong direction. Regards

image

Please take a look at the TopicConfig query interface, add a messageType to the return value and display it on the page

The dashboard repository is here rocketmq-dashboard

Example_CreateTopic.md

@Abhijeetmishr
Copy link
Contributor

@zhouxinyu @kutouziUk @Oliverwqcwrw I think QueueData Class doesnot have this field (message.type) image. Correct me if I'm going in wrong direction. Regards

image

Please take a look at the TopicConfig query interface, add a messageType to the return value and display it on the page
The dashboard repository is here rocketmq-dashboard

Example_CreateTopic.md

@Oliverwqcwrw as far as my understanding change is required in both the places:-

  1. in the query result
  2. on the dashboard as well

@Abhijeetmishr
Copy link
Contributor

@Oliverwqcwrw @zhouxinyu The attribute is not displayed in the query result
image
can anyone point out which controller is responsible for this ?

@Oliverwqcwrw
Copy link
Member

Oliverwqcwrw commented Mar 9, 2023

@Oliverwqcwrw @zhouxinyu The attribute is not displayed in the query result image can anyone point out which controller is responsible for this ?

image

You can find it int the topics.json

@Abhijeetmishr
Copy link
Contributor

Abhijeetmishr commented Mar 11, 2023

 @Override
    public List<TopicConfigInfo> examineTopicConfig(String topic) {
        List<TopicConfigInfo> topicConfigInfoList = Lists.newArrayList();
        TopicRouteData topicRouteData = route(topic);
        for (BrokerData brokerData : topicRouteData.getBrokerDatas()) {
            TopicConfigInfo topicConfigInfo = new TopicConfigInfo();
            TopicConfig topicConfig = examineTopicConfig(topic, brokerData.getBrokerName());
            **BeanUtils.copyProperties(topicConfig, topicConfigInfo);**
            topicConfigInfo.setBrokerNameList(Lists.newArrayList(brokerData.getBrokerName()));
            topicConfigInfoList.add(topicConfigInfo);
        }
        return topicConfigInfoList;
    }

we are copying topicConfig to TopicConfigInfo so I have added the messageType to TopicConfigInfo

    /** topicConfig */
    private String topicName;
    private int writeQueueNums;
    private int readQueueNums;
    private int perm;
    private boolean order;
    **private String  messageType**;   

@Oliverwqcwrw Do we have to update anything in TopicConfig also in rocketMq repo ?

@Oliverwqcwrw
Copy link
Member

 @Override
    public List<TopicConfigInfo> examineTopicConfig(String topic) {
        List<TopicConfigInfo> topicConfigInfoList = Lists.newArrayList();
        TopicRouteData topicRouteData = route(topic);
        for (BrokerData brokerData : topicRouteData.getBrokerDatas()) {
            TopicConfigInfo topicConfigInfo = new TopicConfigInfo();
            TopicConfig topicConfig = examineTopicConfig(topic, brokerData.getBrokerName());
            **BeanUtils.copyProperties(topicConfig, topicConfigInfo);**
            topicConfigInfo.setBrokerNameList(Lists.newArrayList(brokerData.getBrokerName()));
            topicConfigInfoList.add(topicConfigInfo);
        }
        return topicConfigInfoList;
    }

we are copying topicConfig to TopicConfigInfo so I have added the messageType to TopicConfigInfo

    /** topicConfig */
    private String topicName;
    private int writeQueueNums;
    private int readQueueNums;
    private int perm;
    private boolean order;
    **private String  messageType**;   

@Oliverwqcwrw Do we have to update anything in TopicConfig also in rocketMq repo ?

image

IMO, We do not need to modify the rocketmq repository

The latest version of topicConfig has attributes. We need to upgrade rocketmq-common in dashboard

@Abhijeetmishr
Copy link
Contributor

Abhijeetmishr commented Mar 13, 2023

@Oliverwqcwrw I have raised a PR for this in rocketmq-dashboard but I am getting some build error that I have a fix and I have reported link but none has responded yet.
Is there any forum and chat group where I can get response faster for any issue related to Apache community?

@Oliverwqcwrw
Copy link
Member

@Oliverwqcwrw I have raised a PR for this in rocketmq-dashboard but I am getting some build error that I have a fix and I have reported link but none has responded yet. Is there any forum and chat group where I can get response faster for any issue related to Apache community?

Hello @Abhijeetmishr ,
I have assigned the issue to you # 149

@Abhijeetmishr
Copy link
Contributor

@Oliverwqcwrw Please check this when you are available.

Copy link

This issue is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs.

@github-actions github-actions bot added the stale label Mar 14, 2024
Copy link

This issue was closed because it has been inactive for 3 days since being marked as stale.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants