Hello,
I managed to read messages from topic ??. So I have progress. Still open issues are: 1) How may I stub com.att.nsa.security.NsaAclUtils.updateAcl(NsaAclUtils.java:74) for local DMaap development/testing? 2) Are there any Integration or e2e tests agsinst Dmaap in master branch? We could have discussion on Wednesday during DMaap meeting. I think it would be the most convenient way. According to point 2, link would be very useful so that we could focus on point 1 during meeting. Br, Marcin ________________________________ From: UNNAVA, SUNIL <su6...@att.com> Sent: Monday, April 9, 2018 3:35:54 PM To: Migdal, Marcin (Nokia - PL/Wroclaw); MUNNELLI, BHAVANI; onap-discuss@lists.onap.org Cc: KOYA, RAMPRASAD; LUNANUOVA, DOMINIC; KOPP, ANNE E Subject: RE: Testing Dmaap locally - problems with reading messages Marcin, Let me know your convenient time to connect and discuss. Thanks, Sunil From: Migdal, Marcin (Nokia - PL/Wroclaw) [mailto:marcin.mig...@nokia.com] Sent: Monday, April 09, 2018 4:01 AM To: UNNAVA, SUNIL <su6...@att.com>; MUNNELLI, BHAVANI <bm8...@att.com>; onap-discuss@lists.onap.org Cc: KOYA, RAMPRASAD <rk5...@att.com>; LUNANUOVA, DOMINIC <d...@research.att.com>; KOPP, ANNE E <ak1...@att.com> Subject: Re: Testing Dmaap locally - problems with reading messages Hi Sunil, How may I stub com.att.nsa.security.NsaAclUtils.updateAcl(NsaAclUtils.java:74) for local development? Link provided by you is against service from master code or branch code? Are there any Integration or e2e tests agsinst Dmaap in master branch? Br Marcin ________________________________ From: UNNAVA, SUNIL <su6...@att.com<mailto:su6...@att.com>> Sent: Friday, April 6, 2018 4:52:55 PM To: Migdal, Marcin (Nokia - PL/Wroclaw); MUNNELLI, BHAVANI; onap-discuss@lists.onap.org<mailto:onap-discuss@lists.onap.org> Cc: KOYA, RAMPRASAD; LUNANUOVA, DOMINIC; KOPP, ANNE E Subject: RE: Testing Dmaap locally - problems with reading messages Its depend on the consumer. You can define consumer group and consumer id based on your needs. For example using the following URL, I am subscribing to a topic testtopic with consumer group as CG1 and consumer as c1. http://10.12.5.163:30227/events/testtopic/CG1/C1?timeout=1000<https://urldefense.proofpoint.com/v2/url?u=http-3A__10.12.5.163-3A30227_events_testtopic_CG1_C1-3Ftimeout-3D1000&d=DwMF-g&c=LFYZ-o9_HUMeMTSQicvjIg&r=t27CRRmn7U12dnOvcSPfcQ&m=_lmEqJjajqHj77M6Z1GIJJy3A6oDsz2E8ExAlrozIps&s=ZXpPN1_O1neH86s3yieg_Thbvs-MlUvcaJc6Rf9vyD4&e=> Thanks, Sunil From: Migdal, Marcin (Nokia - PL/Wroclaw) [mailto:marcin.mig...@nokia.com] Sent: Friday, April 06, 2018 10:12 AM To: UNNAVA, SUNIL <su6...@att.com<mailto:su6...@att.com>>; MUNNELLI, BHAVANI <bm8...@att.com<mailto:bm8...@att.com>>; onap-discuss@lists.onap.org<mailto:onap-discuss@lists.onap.org> Cc: KOYA, RAMPRASAD <rk5...@att.com<mailto:rk5...@att.com>>; LUNANUOVA, DOMINIC <d...@research.att.com<mailto:d...@research.att.com>> Subject: Re: Testing Dmaap locally - problems with reading messages Hello Sunil, How to determine consumerGroup and consumerId? May they have any values? I have found that there is exposed REST API that enables registering consumer to topic: curl --request PUT localhost:3904/topics/testTopic/consumers/consumerId But when I call it, then there is thrown NullPointerException: Caused by: java.lang.NullPointerException at com.att.nsa.security.NsaAclUtils.updateAcl(NsaAclUtils.java:74) at com.att.nsa.cambria.beans.DMaaPKafkaMetaBroker$KafkaTopic.updateAcl(DMaaPKafkaMetaBroker.java:412) at com.att.nsa.cambria.beans.DMaaPKafkaMetaBroker$KafkaTopic.permitReadsByUser(DMaaPKafkaMetaBroker.java:399) at com.att.nsa.cambria.service.impl.TopicServiceImpl.permitConsumerForTopic(TopicServiceImpl.java:595) at com.att.nsa.dmaap.service.TopicRestService.permitConsumerForTopic(TopicRestService.java:582) How to stub com.att.nsa.security.NsaAclUtils.updateAcl(NsaAclUtils.java:74) for local run of DMaap so that I could register consumer to topic? Regards, Marcin ________________________________ From: UNNAVA, SUNIL <su6...@att.com<mailto:su6...@att.com>> Sent: Friday, April 6, 2018 3:39:44 PM To: Migdal, Marcin (Nokia - PL/Wroclaw); MUNNELLI, BHAVANI; onap-discuss@lists.onap.org<mailto:onap-discuss@lists.onap.org> Cc: KOYA, RAMPRASAD; LUNANUOVA, DOMINIC Subject: RE: Testing Dmaap locally - problems with reading messages Marcin, Consumers has to subscribe to a topic to receive the events. Consumer will receive the messages published after subscribed to a topic. Subscriber URL ({host}:3904/events/testTopic/{consumerGroup}/{consumerId}) is used to both subscribe to a topic and receive messages from the topic. ConsumerGroup and ConsumerId are used to uniquely identify a subscriber. You will not receive 400 as response code even when you are trying to subscribe to a consumer. Thanks, Sunil From: Migdal, Marcin (Nokia - PL/Wroclaw) [mailto:marcin.mig...@nokia.com] Sent: Friday, April 06, 2018 9:09 AM To: UNNAVA, SUNIL <su6...@att.com<mailto:su6...@att.com>>; MUNNELLI, BHAVANI <bm8...@att.com<mailto:bm8...@att.com>>; onap-discuss@lists.onap.org<mailto:onap-discuss@lists.onap.org> Cc: KOYA, RAMPRASAD <rk5...@att.com<mailto:rk5...@att.com>>; LUNANUOVA, DOMINIC <d...@research.att.com<mailto:d...@research.att.com>> Subject: Testing Dmaap locally - problems with reading messages Hello I managed to run Dmaap locally with code from master branch. I am able to list existing queues: Request: curl --request GET localhost:3904/topics/listAll Response: {"topics": [ { "owner": "", "txenabled": false, "topicName": "msgrtr.apinode.metrics.dmaap" }, { "owner": "", "txenabled": false, "topicName": "testTopic" } ]} Also sending messages to quese seems to work fine: Request: curl --header "Content-type: application/json" --request POST --data '{"message":"messageContent"}' http://localhost:3904/events/testTopic Response: { "serverTimeMs": 2, "count": 1 } Also in logs there are entries that message has been published: ""2018-04-06 12:59:09,875 [qtp1555093762-2808] INFO com.att.nsa.dmaap.service.EventsRestService - Publishing message to topic testTopic ""2018-04-06 12:59:09,879 [qtp1555093762-2808] INFO com.att.nsa.cambria.service.impl.EventsServiceImpl - Published 1 msgs in 2ms for topic testTopic Now target is to read messages from topic named testTopic According to: http://onap.readthedocs.io/en/amsterdam/submodules/dmaap/messagerouter/messageservice.git/docs/Installation/Installation.html <https://urldefense.proofpoint.com/v2/url?u=http-3A__onap.readthedocs.io_en_amsterdam_submodules_dmaap_messagerouter_messageservice.git_docs_Installation_Installation.html&d=DwMF-g&c=LFYZ-o9_HUMeMTSQicvjIg&r=t27CRRmn7U12dnOvcSPfcQ&m=RPD2w4klVamKihTTyV_e2UhKEVnJsDSMaR3ECoMTgw4&s=Eqa_W65gMh333DpomJvedIb7EsRdGC-4_IkhHjSsyDs&e=> below request should work fine: curl -H “Content-Type:text/plain” -GET http://localhost:3904/events/testTopic/CG1/C1?timeout=1000 But it does not work. Also logs confirm that: 2018-04-06 13:03:25.608:WARN:oejh.HttpParser:qtp1555093762-2885: badMessage: 400 for HttpChannelOverHttp@7a1b89e8{r=0,c=false,a=IDLE,uri=-} >From EventsRestService implementation I can see that request should look like >as below one: curl --request GET localhost:3904/events/testTopic/{consumerGroup}/{consumerId} But I do not know consumerGroup and ConsumerID. So question how to read messages from DMaap using DMaap REST API? Best regards, Marcin Migdal
_______________________________________________ onap-discuss mailing list onap-discuss@lists.onap.org https://lists.onap.org/mailman/listinfo/onap-discuss