[jira] [Comment Edited] (PROTON-2218) Connector.user and Connector.Password are None

2020-05-12 Thread Angelo Mendonca (Jira)


[ 
https://issues.apache.org/jira/browse/PROTON-2218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17105769#comment-17105769
 ] 

Angelo Mendonca edited comment on PROTON-2218 at 5/12/20, 9:58 PM:
---

Whats the proton email list? And I am passing in the urls...It also shows that 
its getting the urls..
{noformat}
url_one='amqps://b-SOME-9a2d-4c67-99aa-bbe51f58b963-1.mq.us-east-1.amazonaws.com:5671'url_two='amqps://b-SOME-9a2d-4c67-99aa-bbe51f58b963-2.mq.us-east-1.amazonaws.com:5671'{noformat}
{noformat}
hdl=FailOverHandler(url_one,url_two,'test', '{"Name":"Test Data"}'){noformat}
{noformat}
Container(hdl).run(){noformat}


was (Author: angelomendonca):
Whats the proton email list? And I am passing in the urls...It also shows that 
its getting the urls..
{noformat}
url_one='amqps://b-SOME-9a2d-4c67-99aa-bbe51f58b963-1.mq.us-east-1.amazonaws.com:5671'url_two='amqps://b-SOME-9a2d-4c67-99aa-bbe51f58b963-2.mq.us-east-1.amazonaws.com:5671'{noformat}
{noformat}
hdl=FailOverHandler(url_one,url_two,'test', '{"Name":"Test Data"}'){noformat}
{noformat}
c=Container(hdl).run(){noformat}

> Connector.user and Connector.Password are None
> --
>
> Key: PROTON-2218
> URL: https://issues.apache.org/jira/browse/PROTON-2218
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: python-binding
>Affects Versions: proton-c-0.30.0
>Reporter: Angelo Mendonca
>Assignee: Jiri Daněk
>Priority: Major
> Attachments: image-2020-05-12-14-18-33-313.png, jd_answer_1.png
>
>
>  
> {noformat}
> connector.user = kwargs.get('user', self.user)
> print("User", kwargs.get('user', self.user))
> print(connector.user)
> connector.password = kwargs.get('password', self.password)
> print("password", kwargs.get('password', self.password))
> print(connector.password){noformat}
> [https://github.com/apache/qpid-proton/blob/4265cc7ab8391630b47da2de4c1ead2f28763980/python/proton/_reactor.py#L1264]
>  
> [https://github.com/apache/qpid-proton/blob/4265cc7ab8391630b47da2de4c1ead2f28763980/python/proton/_reactor.py#L1265]
>  
> Dont see to exist in kwargs although the print statement just above the 
> kwargs.get shows that user and password exist...
> The output is below..
>  
> {code:java}
> KWARGS {'kwargs': {'sasl_enabled': True, 'allow_insecure_mechs': True, 
> 'password': 'DFfoSQM2ZYlLqCLm', 'user': 'DsWPjfKALYgKmtwsVGHBceceygn'}}
> User None
> None
> password None
> None
> {code}
>  
> The Code setups a container connection..
> !image-2020-05-12-14-18-33-313.png!
>  
> No idea why the user and password are not being set although kwagrs contains 
> both the keysI am trying to get failover to work with AWS Amazon MQ. Does 
> BlockingConnection let you work with multiple URLS? Or do I need to use 
> "container.connect"?
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Comment Edited] (PROTON-2218) Connector.user and Connector.Password are None

2020-05-12 Thread Angelo Mendonca (Jira)


[ 
https://issues.apache.org/jira/browse/PROTON-2218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17105769#comment-17105769
 ] 

Angelo Mendonca edited comment on PROTON-2218 at 5/12/20, 9:47 PM:
---

Whats the proton email list? And I am passing in the urls...It also shows that 
its getting the urls..
{noformat}
url_one='amqps://b-SOME-9a2d-4c67-99aa-bbe51f58b963-1.mq.us-east-1.amazonaws.com:5671'url_two='amqps://b-SOME-9a2d-4c67-99aa-bbe51f58b963-2.mq.us-east-1.amazonaws.com:5671'{noformat}
{noformat}
hdl=FailOverHandler(url_one,url_two,'test', '{"Name":"Test Data"}'){noformat}
{noformat}
c=Container(hdl).run(){noformat}


was (Author: angelomendonca):
Whats the proton email list? And I am passing in the urls...It also shows that 
its getting the urls..

> Connector.user and Connector.Password are None
> --
>
> Key: PROTON-2218
> URL: https://issues.apache.org/jira/browse/PROTON-2218
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: python-binding
>Affects Versions: proton-c-0.30.0
>Reporter: Angelo Mendonca
>Assignee: Jiri Daněk
>Priority: Major
> Attachments: image-2020-05-12-14-18-33-313.png, jd_answer_1.png
>
>
>  
> {noformat}
> connector.user = kwargs.get('user', self.user)
> print("User", kwargs.get('user', self.user))
> print(connector.user)
> connector.password = kwargs.get('password', self.password)
> print("password", kwargs.get('password', self.password))
> print(connector.password){noformat}
> [https://github.com/apache/qpid-proton/blob/4265cc7ab8391630b47da2de4c1ead2f28763980/python/proton/_reactor.py#L1264]
>  
> [https://github.com/apache/qpid-proton/blob/4265cc7ab8391630b47da2de4c1ead2f28763980/python/proton/_reactor.py#L1265]
>  
> Dont see to exist in kwargs although the print statement just above the 
> kwargs.get shows that user and password exist...
> The output is below..
>  
> {code:java}
> KWARGS {'kwargs': {'sasl_enabled': True, 'allow_insecure_mechs': True, 
> 'password': 'DFfoSQM2ZYlLqCLm', 'user': 'DsWPjfKALYgKmtwsVGHBceceygn'}}
> User None
> None
> password None
> None
> {code}
>  
> The Code setups a container connection..
> !image-2020-05-12-14-18-33-313.png!
>  
> No idea why the user and password are not being set although kwagrs contains 
> both the keysI am trying to get failover to work with AWS Amazon MQ. Does 
> BlockingConnection let you work with multiple URLS? Or do I need to use 
> "container.connect"?
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Comment Edited] (PROTON-2218) Connector.user and Connector.Password are None

2020-05-12 Thread Angelo Mendonca (Jira)


[ 
https://issues.apache.org/jira/browse/PROTON-2218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17105769#comment-17105769
 ] 

Angelo Mendonca edited comment on PROTON-2218 at 5/12/20, 9:46 PM:
---

Whats the proton email list? And I am passing in the urls...It also shows that 
its getting the urls..


was (Author: angelomendonca):
Whats the proton email list?

> Connector.user and Connector.Password are None
> --
>
> Key: PROTON-2218
> URL: https://issues.apache.org/jira/browse/PROTON-2218
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: python-binding
>Affects Versions: proton-c-0.30.0
>Reporter: Angelo Mendonca
>Assignee: Jiri Daněk
>Priority: Major
> Attachments: image-2020-05-12-14-18-33-313.png, jd_answer_1.png
>
>
>  
> {noformat}
> connector.user = kwargs.get('user', self.user)
> print("User", kwargs.get('user', self.user))
> print(connector.user)
> connector.password = kwargs.get('password', self.password)
> print("password", kwargs.get('password', self.password))
> print(connector.password){noformat}
> [https://github.com/apache/qpid-proton/blob/4265cc7ab8391630b47da2de4c1ead2f28763980/python/proton/_reactor.py#L1264]
>  
> [https://github.com/apache/qpid-proton/blob/4265cc7ab8391630b47da2de4c1ead2f28763980/python/proton/_reactor.py#L1265]
>  
> Dont see to exist in kwargs although the print statement just above the 
> kwargs.get shows that user and password exist...
> The output is below..
>  
> {code:java}
> KWARGS {'kwargs': {'sasl_enabled': True, 'allow_insecure_mechs': True, 
> 'password': 'DFfoSQM2ZYlLqCLm', 'user': 'DsWPjfKALYgKmtwsVGHBceceygn'}}
> User None
> None
> password None
> None
> {code}
>  
> The Code setups a container connection..
> !image-2020-05-12-14-18-33-313.png!
>  
> No idea why the user and password are not being set although kwagrs contains 
> both the keysI am trying to get failover to work with AWS Amazon MQ. Does 
> BlockingConnection let you work with multiple URLS? Or do I need to use 
> "container.connect"?
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Comment Edited] (PROTON-2218) Connector.user and Connector.Password are None

2020-05-12 Thread Jira


[ 
https://issues.apache.org/jira/browse/PROTON-2218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17105748#comment-17105748
 ] 

Jiri Daněk edited comment on PROTON-2218 at 5/12/20, 9:18 PM:
--

You can either keep using BlockingConnection, catch the exception when the 
broker disconnects you and then reconnect yourself. Or you can use 
`proton.Container` directly, call {{.connect}} with {{urls=[...], 
reconnect=True...}} Essentially the code you had above, your {{def on_start}} 
and so on. BlockingConnection is just a wrapper around proton.Container.




was (Author: jdanek):
You can either catch the exception when the broker disconnects you and then 
reconnect yourself. Or you can use `proton.Container` directly, call 
{{.connect}} with {{urls=[...], reconnect=True...}} Essentially the code you 
had above, your {{def on_start}} and so on. BlockingConnection is just a 
wrapper around proton.Container.



> Connector.user and Connector.Password are None
> --
>
> Key: PROTON-2218
> URL: https://issues.apache.org/jira/browse/PROTON-2218
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: python-binding
>Affects Versions: proton-c-0.30.0
>Reporter: Angelo Mendonca
>Assignee: Jiri Daněk
>Priority: Major
> Attachments: image-2020-05-12-14-18-33-313.png, jd_answer_1.png
>
>
>  
> {noformat}
> connector.user = kwargs.get('user', self.user)
> print("User", kwargs.get('user', self.user))
> print(connector.user)
> connector.password = kwargs.get('password', self.password)
> print("password", kwargs.get('password', self.password))
> print(connector.password){noformat}
> [https://github.com/apache/qpid-proton/blob/4265cc7ab8391630b47da2de4c1ead2f28763980/python/proton/_reactor.py#L1264]
>  
> [https://github.com/apache/qpid-proton/blob/4265cc7ab8391630b47da2de4c1ead2f28763980/python/proton/_reactor.py#L1265]
>  
> Dont see to exist in kwargs although the print statement just above the 
> kwargs.get shows that user and password exist...
> The output is below..
>  
> {code:java}
> KWARGS {'kwargs': {'sasl_enabled': True, 'allow_insecure_mechs': True, 
> 'password': 'DFfoSQM2ZYlLqCLm', 'user': 'DsWPjfKALYgKmtwsVGHBceceygn'}}
> User None
> None
> password None
> None
> {code}
>  
> The Code setups a container connection..
> !image-2020-05-12-14-18-33-313.png!
>  
> No idea why the user and password are not being set although kwagrs contains 
> both the keysI am trying to get failover to work with AWS Amazon MQ. Does 
> BlockingConnection let you work with multiple URLS? Or do I need to use 
> "container.connect"?
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org



[jira] [Comment Edited] (PROTON-2218) Connector.user and Connector.Password are None

2020-05-12 Thread Jira


[ 
https://issues.apache.org/jira/browse/PROTON-2218?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17105693#comment-17105693
 ] 

Jiri Daněk edited comment on PROTON-2218 at 5/12/20, 7:48 PM:
--

The way {{**kwargs}} works in Python is that it collects all keyword arguments 
which are not named explicitly in function definition.

bq. When a final formal parameter of the form **name is present, it receives a 
dictionary (see Mapping Types — dict) containing all keyword arguments except 
for those corresponding to a formal parameter. 
https://docs.python.org/3/tutorial/controlflow.html#keyword-arguments

You do not specify a {{kwargs}} parameter explicitly, as a dictionary. Instead, 
you just pass the keys as keyword arguments, and Python collects them into the 
{{kwargs}}.

 !jd_answer_1.png! 


was (Author: jdanek):
The way {{**kwargs}} works in Python is that it collects all keyword parameters 
which are not given explicitly in function definition.

bq. When a final formal parameter of the form **name is present, it receives a 
dictionary (see Mapping Types — dict) containing all keyword arguments except 
for those corresponding to a formal parameter. 
https://docs.python.org/3/tutorial/controlflow.html#keyword-arguments

You do not specify a {{kwargs}} parameter explicitly, as a dictionary. Instead, 
you just pass the keys as keyword arguments, and Python collects them into the 
{{kwargs}}.

 !jd_answer_1.png! 

> Connector.user and Connector.Password are None
> --
>
> Key: PROTON-2218
> URL: https://issues.apache.org/jira/browse/PROTON-2218
> Project: Qpid Proton
>  Issue Type: Bug
>  Components: python-binding
>Affects Versions: proton-c-0.30.0
>Reporter: Angelo Mendonca
>Priority: Major
> Attachments: image-2020-05-12-14-18-33-313.png, jd_answer_1.png
>
>
>  
> {noformat}
> connector.user = kwargs.get('user', self.user)
> print("User", kwargs.get('user', self.user))
> print(connector.user)
> connector.password = kwargs.get('password', self.password)
> print("password", kwargs.get('password', self.password))
> print(connector.password){noformat}
> [https://github.com/apache/qpid-proton/blob/4265cc7ab8391630b47da2de4c1ead2f28763980/python/proton/_reactor.py#L1264]
>  
> [https://github.com/apache/qpid-proton/blob/4265cc7ab8391630b47da2de4c1ead2f28763980/python/proton/_reactor.py#L1265]
>  
> Dont see to exist in kwargs although the print statement just above the 
> kwargs.get shows that user and password exist...
> The output is below..
>  
> {code:java}
> KWARGS {'kwargs': {'sasl_enabled': True, 'allow_insecure_mechs': True, 
> 'password': 'DFfoSQM2ZYlLqCLm', 'user': 'DsWPjfKALYgKmtwsVGHBceceygn'}}
> User None
> None
> password None
> None
> {code}
>  
> The Code setups a container connection..
> !image-2020-05-12-14-18-33-313.png!
>  
> No idea why the user and password are not being set although kwagrs contains 
> both the keysI am trying to get failover to work with AWS Amazon MQ. Does 
> BlockingConnection let you work with multiple URLS? Or do I need to use 
> "container.connect"?
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

-
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org