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

Issue with endpoint - Oracle Queue #467

Open
PedroSousaEquals opened this issue Nov 10, 2023 · 4 comments
Open

Issue with endpoint - Oracle Queue #467

PedroSousaEquals opened this issue Nov 10, 2023 · 4 comments
Labels
SDK Issue pertains to the SDK itself and not specific to any service

Comments

@PedroSousaEquals
Copy link

PedroSousaEquals commented Nov 10, 2023

Hello, I'm using the GO SDK for queue services, but I encountered an error when using it:

Message Error: Please use endpoint https://cell-1.queue.messaging.sa-vinhedo-1.oci.oraclecloud.com\nOperation Name: GetMessages\nTimestamp: 2023-11-10 18:40:57.086135167 -0300 - 03 m=+140.026919796\nClient Version: Oracle-GoSDK/65.49.1\nRequest Endpoint: GET

When I looked at queue/queue_client.go I saw that the endpoint is like:

https://messaging.{region}.oci.{secondLevelDomain}

in queue/queue_client.go line 68

// SetRegion overrides the region of this client.
func (client *QueueClient) SetRegion(region string) {
	client.Host = common.StringToRegion(region).EndpointForTemplate("queue", "https://messaging.{region}.oci.{secondLevelDomain}")
}

when changing to

https://cell-1.oracle.queue.{region}.oci.{secondLevelDomain}

the error disappears. Can you help me?

My function:

`
req := queue.GetMessagesRequest{

Limit:               common.Int(11),
QueueId:             common.String("ocid1.queue.oc1.sa-vinhedo-1.*********"),
TimeoutInSeconds:    common.Int(22),
VisibilityInSeconds: common.Int(9353)}

resp, err := queueClient.GetMessages(context.Background(), req)
if err != nil {
	return err
}`
@PedroSousaEquals PedroSousaEquals changed the title Issue with endpoint queue Issue with endpoint - Oracle Queue Nov 10, 2023
@richachugh11 richachugh11 added the SDK Issue pertains to the SDK itself and not specific to any service label Nov 17, 2023
@SAURAVDX007
Copy link

Is there any update on this? Even I am facing same issue.

@JoshuaWR
Copy link
Member

Hi @PedroSousaEquals @SAURAVDX007, sorry for the late response. Have you tried setting the endpoint manually in your code? ie:

--> queueClient.Host = https://cell-1.queue.messaging.sa-vinhedo-1.oci.oraclecloud.com
resp, err := queueClient.GetMessages(context.Background(), req)
if err != nil {
return err
}

Please let us know if this helps, thanks!

@SAURAVDX007
Copy link

@JoshuaWR using Host does seem to work for me. Thanks Joshua

@JoshuaWR
Copy link
Member

@PedroSousaEquals Have you tried this solution as well? Let us know if it works for you, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SDK Issue pertains to the SDK itself and not specific to any service
Projects
None yet
Development

No branches or pull requests

4 participants