Okay. Thanks Asanka! I also found following log after Member Created and before Member Initialized message where I can see the instance id.
[2015-07-02 18:49:21,047] INFO {org.apache.stratos.cloud.controller.iaases.JcloudsIaas} - Retrieving private IP addresses MemberContext [applicationId=single-cartridge-app, cartridgeType=php, clusterId=single-cartridge-app.my-php.php.domain, memberId=single-cartridge-app.my-php.php.domain35a7c134-9500-4fe3-bba4-90fa60600076,* instanceId=ap-southeast-1/i-0bb89bc7*, partition=Partition [id=partition-1, description=null, isPublic=false, provider=ec2, properties=Properties [properties=[Property [name=region, value=ap-southeast-1], Property [name=zone, value=ap-southeast-1a]]]], defaultPrivateIP=172.31.16.59, defaultPublicIP=54.169.94.233, allocatedIPs=null, publicIPs=[54.169.94.233], privateIPs=[172.31.16.59], initTime=1435862583270, lbClusterId=null, networkPartitionId=network-partition-1, kubernetesPodId=null, kubernetesPodLabel=null, loadBalancingIPType=Private, instanceMetadata=org.apache.stratos.cloud.controller.domain.InstanceMetadata@2ab353d9, properties=Properties [properties=[Property [name=PRIMARY, value=false], Property [name=MIN_COUNT, value=1]]]] So yes, handleMemberInitialized should get it. Thanks and Regards, Swapnil On Thu, Jul 2, 2015 at 6:42 PM, Asanka Sanjaya Herath <angal...@gmail.com> wrote: > β >> So just wanted to know if you are able to get instance id there.β > > > βYes I was able to get instance ID once I set it in member initialized > event.β > > > On Fri, Jul 3, 2015 at 12:08 AM, Asanka Sanjaya Herath <angal...@gmail.com > > wrote: > >> Hi Swapnil, >> >> IMO We need to set instance ID in member *initialized *event, not in >> member created event. In member created event I also got member ID as null. >> Because I think that instance ID is not set in member created event. >> Another important thing is we need to do message processor side changes in >> order to expose the instance ID through topology to other components as >> well. See this commit [1]. >> >> [1]. >> https://github.com/apache/stratos/commit/9f44791884a54499997a0e5d00f7a4b46047b3b2 >> >> On Thu, Jul 2, 2015 at 11:56 PM, Swapnil Patil <swapnil.r...@gmail.com> >> wrote: >> >>> Hi Asanka, >>> >>> I am trying to expose instance id through topology. For that I have made >>> these changes [1]. I am trying to retrieve instance id of member context >>> and set it to Member object inside handleMemberCreatedEvent. But I am >>> getting instance id of member context, which is passed as argument as null. >>> >>> I went through your code changes and noticed that you have this change >>> of setting instance id of member in handleMemberInitializedEvent [2]. >>> >>> So just wanted to know if you are able to get instance id there. >>> >>> [1] >>> https://github.com/swaprp15/stratos/commit/5770646efe7faa50b8ea2c36391a03e0e404a632 >>> [2] >>> https://github.com/asankasanjaya/stratos/blob/master/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/messaging/topology/TopologyBuilder.java#L471 >>> >>> Thanks and Regards, >>> Swapnil >>> >> >> >> >> -- >> Thanks, >> Regards, >> ASH >> > > > > -- > Thanks, > Regards, > ASH >