Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

q3

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

q3

  • 0.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Q3

Summary

Simple Amazon SQS compatible API implementation with sinatra and redis.

Concept

  • simplicity
  • no authentication, open like wiki
  • no validation, just works as proxy to redis functions

Usage

global service

You can try q3 easily with global endpoint http://q3-global.herokuapp.com/.

$ curl "http://q3-global.herokuapp.com/?Action=CreateQueue&QueueName=MyQueue001"
<?xml version="1.0" encoding="UTF-8"?>
<CreateQueueResponse>
  <CreateQueueResult>
    <QueueUrl>http://q3-global.herokuapp.com/*/MyQueue001</QueueUrl>
  </CreateQueueResult>
  <ResponseMetadata>
    <RequestId>9bcf7831-59a3-456c-b5fe-e0674f322b79</RequestId>
  </ResponseMetadata>
</CreateQueueResponse>

You can use any Amazon SQS client.

require 'aws-sdk'
q3 = AWS::SQS.new(
	:sqs_endpoint => 'q3-global.herokuapp.com',
	:access_key_id => 'dummy',
	:secret_access_key => 'dummy',
	:use_ssl => false
)

queue = q3.queues.create('MyQueue001')
queue.send_message('hello!')
p queue.receive_message.body # => "hello!"

as rack app

Install gem and you can invoke q3 command to run api.

$ gem install q3
$ ruby bin/q3
[2014-07-06 19:54:47] INFO  WEBrick 1.3.1
[2014-07-06 19:54:47] INFO  ruby 2.0.0 (2014-02-24) [universal.x86_64-darwin13]
== Sinatra/1.4.5 has taken the stage on 4567 for development with backup from WEBrick
[2014-07-06 19:54:47] INFO  WEBrick::HTTPServer#start: pid=29495 port=4567

Or you can integrate q3 into your config.ru like this:

require 'q3.rb'
run Q3

Actions

See for complete action list: Welcome - Amazon Simple Queue Service.

implemented

  • Queue Operation
    • CreateQueue
    • ListQueues
    • GetQueueAttributes
    • GetQueueUrl
    • SetQueueAttributes
    • DeleteQueue
  • Message Operation
    • SendMessage
    • ReceiveMessage
    • ChangeMessageVisibility
    • DeleteMessage

will be implemented

  • SendMessageBatch
  • ChangeMessageVisibilityBatch
  • DeleteMessageBatch
  • ListDeadLetterSourceQueues

will not be implemented

  • AddPermission
  • RemovePermission

Data Schema

Key NameTypeContentDelete Timing
QueuesListQueue Names-
Queues:${QueueName}HashQueue AttributesDeleteQueue action
Queues:${QueueName}:MessagesListMessage IdsDeleteQueue action
Queues:${QueueName}:Messages:${MessageId}HashMessage Attributesexpires due to MessageRetentionPeriod
Queues:${QueueName}:Messages:${MessageId}:DelayedStringMessage Idexpires due to DelaySeconds
Queues:${QueueName}:Messages:${MessageId}:ReceiptHandleStringReceiptHandleexpires due to VisibilityTimeout
Queues:${QueueName}:ReceiptHandles:${ReceiptHandle}StringMessage Idexpires due to VisibilityTimeout

TODO

  • https
  • mount on subdirectory

FAQs

Package last updated on 06 Jul 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc