首页 \ 问答 \ 授予只读权限(Grant read-only permissions)

授予只读权限(Grant read-only permissions)

我想为必须从像Glassfish这样的应用服务器访问的PostgreSQL数据库角色分配基本的只读权限。


I want to assigned basic read-only permissions for a PostgreSQL database role that must access from an Application server like Glassfish.


原文:https://stackoverflow.com/questions/40770731
更新时间:2021-10-20 20:10

最满意答案

使用rabbitmq,你总能克服拒绝。 逻辑上没有明确需要使用reject ,因为nack可以做任何reject事情。 正如你所说,这两个都适用于一条消息,但也适用于多条消息。

同样nack由rabbitmq引入(所以它是一个扩展),并不是amqp 0.9.1规范的一部分。


With rabbitmq you can always nack over reject. Logically there is no explicit need to use reject, since nack can do anything reject can. As you said, both of these work for one message, but nack also for multiple.

Also nack is introduced by rabbitmq (so it's an extension), and is not part of amqp 0.9.1 specs.

相关问答

更多
  • 那么,让我们仔细看看你上面描述的场景。 我认为在问题片段之前立即粘贴文档以提供上下文很重要: AMQP 0-9-1核心规范的第4.7节解释了保证排序的条件:在一个频道中发布的消息,通过一个交换机,一个队列和一个输出频道将按照它们发送的相同顺序接收。 自2.7.0版本以来,RabbitMQ提供了更强大的保证。 使用AMQP方法可以将消息返回到队列,这些方法具有一个requeue参数(basic.recover,basic.reject和basic.nack),或者由于在保存未确认消息时通道关闭。 任何这些情况 ...
  • Rafael,我不确定你使用的是哪个客户端,但是使用Python中的Pika客户端你可以实现这样的东西。 为简单起见,我只使用一次交换。 您确定要正确设置交换机和路由密钥吗? sender.py import sys import pika connection = pika.BlockingConnection(pika.ConnectionParameters( 'localhost')) channel = connection.channel() channel.exc ...
  • 从发布者/发件人向主队列发布消息时,向邮件添加当前时间戳值。 例如,'published_on'=> 1476424186。 在消费者方面,首先检查当前时间戳和published_on的时差。 如果发现差异小于5分钟,则将您的消息发送到另一个队列(DLX队列)并设置过期时间。(使用amqp消息的'expiration'属性) 此到期值应为(当前时间戳 - published_on),并且应该以毫秒为单位。 消息将在精确的5分钟内在DLX队列中过期。 确保'x-dead-letter-exchange'应该是 ...
  • 如果你没有指定预取(qos),那么RabbitMQ会发送你的消费者尽可能多的消息,因为连接可以处理。 所以根本就不要调用basic_qos。 要最大化连接的吞吐量,请勿发送每条消息的确认,但使用multiple = true的basic_ack,并且一次确认大批消息。 这带有风险。 如果你的连接消失了,你将会有一大堆消息被重新发送,如果你批量发送消息,你也会重新处理大量的消息。 但是如果你的消费者是一个网络爬虫,那么可能发生的最糟糕的情况是它爬两次网站或页面,所以没什么大不了的。 If you don't ...
  • 所以经过大量的游戏,我回到了文档并重新阅读,它清楚地说明,如果你拒绝一个requeue=false的消息,那么如果你定义了一个与主队列相关的死信交换,那么它将自动被删除。 所以问题现在解决了! So after tons of playing around, I went back to the documentation and reread, and it clearly states, if you reject a message with requeue=false then it will au ...
  • 请参阅RabbitMQ FAQ中的此条目 。 虽然您可能希望RabbitMQ重新将未发送的消息重新排列到队列头部(在消费者拉下它们之前的位置),但实际情况可能会与您经历的不同。 所以并不是说Basic.Recover()不起作用(消息放回队列以备未来再处理),只是它无法按照预期的方式工作。 我脑子里的一些东西告诉我,你可以通过设置一个预取计数为1并且任何时候最多只有一个消费者连接到队列来获得你想要的行为,但我不能保证这是案件。 值得尝试。 然而,即使它有效,它也不会依赖永久保留这种情况,并且如此低的预取次数 ...
  • 问:“我读过BasicAck / BasicNack会拒绝多条消息。使用Ack / Nack并将多个标志设置为false是否有用?” 答:如果你有1的预取,那么没有。 如果你有一个更高的预取,并且你做多个确认并不复杂,那么去吧。 多次确认可以提高性能。 但要注意不要承认低于您之前承认的交货标签。 问:“在发布到死信后,我们应该拒绝它或者使用BasicNack?我们应该重新发布消息吗?” 答:使用带有requeue = false的BasicNack,如果队列配置了一个,它会将它发送到死信交换。 如果您不想要 ...
  • 使用rabbitmq,你总能克服拒绝。 逻辑上没有明确需要使用reject ,因为nack可以做任何reject事情。 正如你所说,这两个都适用于一条消息,但也适用于多条消息。 同样nack由rabbitmq引入(所以它是一个扩展),并不是amqp 0.9.1规范的一部分。 With rabbitmq you can always nack over reject. Logically there is no explicit need to use reject, since nack can do an ...
  • 您正在查找错误的交付标签,该交付标签已经被确认或在当前渠道方面从未存在过。 查看应用程序源代码以了解它是如何发生的。 You are acking wrong delivery tag which is already was ack-ed or never exists in terms of current channel. See you application source code to figure out how it happens.
  • 未确认的消息将保持不确认状态,直到收到消息的消费者拒绝或拒绝该消息,或者连接/信道已关闭。 当连接/通道死亡时,Rabbitmq假定这些消息未被处理,因此它们可用于传递给另一个消费者。 为了防止将来发生这种情况,如果消费者不对它做任何事情和/或正确关闭与rabbitmq的连接/通道的逻辑,你应该在消费者中有一些拒绝/拒绝消息的逻辑。 The solution seems to be very simple. If you close the connection which has unacknowledg ...

相关文章

更多

最新问答

更多
  • 您如何使用git diff文件,并将其应用于同一存储库的副本的本地分支?(How do you take a git diff file, and apply it to a local branch that is a copy of the same repository?)
  • 将长浮点值剪切为2个小数点并复制到字符数组(Cut Long Float Value to 2 decimal points and copy to Character Array)
  • OctoberCMS侧边栏不呈现(OctoberCMS Sidebar not rendering)
  • 页面加载后对象是否有资格进行垃圾回收?(Are objects eligible for garbage collection after the page loads?)
  • codeigniter中的语言不能按预期工作(language in codeigniter doesn' t work as expected)
  • 在计算机拍照在哪里进入
  • 使用cin.get()从c ++中的输入流中丢弃不需要的字符(Using cin.get() to discard unwanted characters from the input stream in c++)
  • No for循环将在for循环中运行。(No for loop will run inside for loop. Testing for primes)
  • 单页应用程序:页面重新加载(Single Page Application: page reload)
  • 在循环中选择具有相似模式的列名称(Selecting Column Name With Similar Pattern in a Loop)
  • System.StackOverflow错误(System.StackOverflow error)
  • KnockoutJS未在嵌套模板上应用beforeRemove和afterAdd(KnockoutJS not applying beforeRemove and afterAdd on nested templates)
  • 散列包括方法和/或嵌套属性(Hash include methods and/or nested attributes)
  • android - 如何避免使用Samsung RFS文件系统延迟/冻结?(android - how to avoid lag/freezes with Samsung RFS filesystem?)
  • TensorFlow:基于索引列表创建新张量(TensorFlow: Create a new tensor based on list of indices)
  • 企业安全培训的各项内容
  • 错误:RPC失败;(error: RPC failed; curl transfer closed with outstanding read data remaining)
  • C#类名中允许哪些字符?(What characters are allowed in C# class name?)
  • NumPy:将int64值存储在np.array中并使用dtype float64并将其转换回整数是否安全?(NumPy: Is it safe to store an int64 value in an np.array with dtype float64 and later convert it back to integer?)
  • 注销后如何隐藏导航portlet?(How to hide navigation portlet after logout?)
  • 将多个行和可变行移动到列(moving multiple and variable rows to columns)
  • 提交表单时忽略基础href,而不使用Javascript(ignore base href when submitting form, without using Javascript)
  • 对setOnInfoWindowClickListener的意图(Intent on setOnInfoWindowClickListener)
  • Angular $资源不会改变方法(Angular $resource doesn't change method)
  • 在Angular 5中不是一个函数(is not a function in Angular 5)
  • 如何配置Composite C1以将.m和桌面作为同一站点提供服务(How to configure Composite C1 to serve .m and desktop as the same site)
  • 不适用:悬停在悬停时:在元素之前[复制](Don't apply :hover when hovering on :before element [duplicate])
  • 常见的python rpc和cli接口(Common python rpc and cli interface)
  • Mysql DB单个字段匹配多个其他字段(Mysql DB single field matching to multiple other fields)
  • 产品页面上的Magento Up出售对齐问题(Magento Up sell alignment issue on the products page)